From patchwork Fri Apr 22 10:02:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 8908661 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BA1BF9F39A for ; Fri, 22 Apr 2016 10:07:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D98D22024F for ; Fri, 22 Apr 2016 10:07:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 133DB201B4 for ; Fri, 22 Apr 2016 10:07:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752571AbcDVKDS (ORCPT ); Fri, 22 Apr 2016 06:03:18 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34859 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751724AbcDVKDQ (ORCPT ); Fri, 22 Apr 2016 06:03:16 -0400 Received: by mail-pf0-f196.google.com with SMTP id r187so9761528pfr.2; Fri, 22 Apr 2016 03:03:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZpgNUYkdSGG3WXJmw66w1l2eY8HK0mdw+isvNg25Fl0=; b=c76QeDstZ4IbfAlwE974Pb6NUuC+OJjywtl6wvw/GNamSlW6jl3pxgvYdDWMOg2J1+ JlHBEjGKnlPOEAhqD/p4fFvrOpIELzMKR8AWfec7cYvWOSsGUdOAMETX4wG2tC6wGoKy utH0/RcztQwgrfRQGIsoQJ3x/ohIaanwDe3YT3yeQUCDiig8cu3JOMVUKkwybYAXf90e cLVODgwquiziYGP7AYqg2yZ3436VNZYlV62ucTt+iwfYoN6JluLXBJFRB7/M1g/kHopW qLWVWdkaJNafehFybVDt4ikYAwxHPus3j8ZYpusLsBM42Rkks3scrS2+XYAgqKBSLCTP sujw== X-Gm-Message-State: AOPr4FXAQWWuScz/a3dcYkD69rIeMlGpdPCPO+y2rM1tGCeQ0g44L9Gq8QPV8v8/NMOsNA== X-Received: by 10.98.79.203 with SMTP id f72mr27395112pfj.102.1461319395299; Fri, 22 Apr 2016 03:03:15 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id 27sm7132490pfo.58.2016.04.22.03.03.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Apr 2016 03:03:14 -0700 (PDT) From: Caesar Wang To: edubezval@gmail.com, Heiko Stuebner Cc: dianders@chromium.org, briannorris@google.com, smbarber@google.com, linux-rockchip@lists.infradead.org, Shawn Lin , Caesar Wang , Zhang Rui , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH 1/8] thermal: rockchip: disable thermal->clk in err case Date: Fri, 22 Apr 2016 18:02:47 +0800 Message-Id: <1461319374-10024-2-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461319374-10024-1-git-send-email-wxt@rock-chips.com> References: <1461319374-10024-1-git-send-email-wxt@rock-chips.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Shawn Lin Disable thermal->clk when enabling pclk fails in resume routine. Signed-off-by: Shawn Lin Reviewed-by: Heiko Stuebner Reviewed-by: Caesar Wang Signed-off-by: Caesar Wang --- drivers/thermal/rockchip_thermal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index 1dbd862..f4c4bcd 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -979,8 +979,10 @@ static int __maybe_unused rockchip_thermal_resume(struct device *dev) return error; error = clk_enable(thermal->pclk); - if (error) + if (error) { + clk_disable(thermal->clk); return error; + } rockchip_thermal_reset_controller(thermal->reset);