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: 8867441 X-Patchwork-Delegate: eduardo.valentin@ti.com 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 9563F9F36E for ; Mon, 18 Apr 2016 03:39:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0211F201BC for ; Mon, 18 Apr 2016 03:39:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1FBD7200F2 for ; Mon, 18 Apr 2016 03:39:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752543AbcDRDhV (ORCPT ); Sun, 17 Apr 2016 23:37:21 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:35965 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753278AbcDRDhR (ORCPT ); Sun, 17 Apr 2016 23:37:17 -0400 Received: by mail-pa0-f68.google.com with SMTP id i5so1198543pag.3; 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=hnMDv4vX2nw8ytfvUtjaMwR2EuaiQbkH0c6IkJV6Le0JmOFEZlWGsEhwYU3Og4Vwzf tdNVLd4pcc9+CEkGDOZTGpP2T1bSSMqhDHuMgd4JQTPYwn3K8URV+LNPgJ6AG0g5Rro7 1hMfBYDnHYhFUoycAUcomN6U2ZEO6YPPDTJSlAKXSy57kQHsJZYjyg/a96CIE3+h+1vJ rfu7wRhhEE62gzfb8veFaikfvMUmX2Vc0RffmpNtU/wpMywGdSWdrHSL4dam8Nb9DVjQ yvxlHqDJymVYDJZu5Zhb5c5x1pO0nQ9TkD2ycFnpNB8Z1UhEV9yobkmaHwtgqSyythgp nuYg== X-Gm-Message-State: AOPr4FXK38lhil0J/ujr0qlkgcZCyDHfdYu5VzQWY86mCo/58vXYsP7/S9CS014orsOuYQ== 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 Cc: Heiko Stuebner , 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: [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> 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=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);