From patchwork Mon Apr 18 03:35:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 8867331 Return-Path: X-Original-To: patchwork-linux-arm@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 CC4199F36E for ; Mon, 18 Apr 2016 03:38:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 175BE200E7 for ; Mon, 18 Apr 2016 03:38:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 471A2200E6 for ; Mon, 18 Apr 2016 03:38:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1as00L-00008t-Ix; Mon, 18 Apr 2016 03:37:41 +0000 Received: from mail-pa0-f68.google.com ([209.85.220.68]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1as00H-0008Vo-Of; Mon, 18 Apr 2016 03:37:38 +0000 Received: by mail-pa0-f68.google.com with SMTP id zy2so15255812pac.2; Sun, 17 Apr 2016 20:37:17 -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=XqLupDiuuGbVEDtN0CTPx/JY6vLqzVPT+mvCzOYDX2+wIYQpTTcqTZRrl2LiTAZ4u4 FKGx0lW1JxZL3GQO14eg9OR53SY4zNNbGlVHxDAhOoS0F/zO9CjQtZPQBIFBNhBIyWjZ T8RGFlSVqnVNcVGfqHYeM/1jCPedp0dByXVLbRyq2ezPEq70jssrEBWO51C2cjf+Xu4g iBGRYyG3T1gq/Lb260HQNKkmUadi7oguKHN/XNV7jXP1PV8O9kz4+FDgaq7JkTLs5pCK FBBa+m1c47MDDvw3u4fw/h75zbYGNTHHATWWSGOYiFHgFp261tO445zRw6kv7lgwewl8 05YA== X-Gm-Message-State: AOPr4FXJDQXHyR15JVVrbsO9OWoOuJUZarnO1xMKkkMBUSdld1Fv9g4pAtlYW9jrUCSy+g== X-Received: by 10.66.153.174 with SMTP id vh14mr13913916pab.131.1460950637090; Sun, 17 Apr 2016 20:37:17 -0700 (PDT) Received: from localhost.localdomain ([104.37.5.139]) by smtp.gmail.com with ESMTPSA id tp9sm79756867pab.14.2016.04.17.20.37.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 17 Apr 2016 20:37:16 -0700 (PDT) From: Caesar Wang To: edubezval@gmail.com Subject: [PATCH 1/9] thermal: rockchip: disable thermal->clk in err case Date: Mon, 18 Apr 2016 11:35:53 +0800 Message-Id: <1460950562-20652-2-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460950562-20652-1-git-send-email-wxt@rock-chips.com> References: <1460950562-20652-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160417_203737_863733_69677CED X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.4 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-pm@vger.kernel.org, Shawn Lin , dianders@chromium.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, smbarber@google.com, briannorris@google.com, Zhang Rui , linux-arm-kernel@lists.infradead.org, Caesar Wang MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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);