From patchwork Wed Nov 16 22:15:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Lu=C3=ADs_Henriques?= X-Patchwork-Id: 9433217 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 781D160755 for ; Wed, 16 Nov 2016 23:29:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69942291A6 for ; Wed, 16 Nov 2016 23:29:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E73D291AA; Wed, 16 Nov 2016 23:29:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 067DC291A8 for ; Wed, 16 Nov 2016 23:29:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754026AbcKPX3I (ORCPT ); Wed, 16 Nov 2016 18:29:08 -0500 Received: from balrog.mythic-beasts.com ([93.93.130.6]:49560 "EHLO balrog.mythic-beasts.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753478AbcKPX3H (ORCPT ); Wed, 16 Nov 2016 18:29:07 -0500 X-Greylist: delayed 4413 seconds by postgrey-1.27 at vger.kernel.org; Wed, 16 Nov 2016 18:29:06 EST Received: from [217.129.130.179] (port=64021 helo=localhost) by balrog.mythic-beasts.com with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1c78UR-0003v0-O9; Wed, 16 Nov 2016 22:15:36 +0000 From: Luis Henriques To: Eduardo Valentin , Keerthy , Zhang Rui Cc: linux-pm@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Henriques Subject: [PATCH] thermal: ti-soc-thermal: add missing clk_put() Date: Wed, 16 Nov 2016 22:15:22 +0000 Message-Id: <20161116221522.22359-1-henrix@camandro.org> X-BlackCat-Spam-Score: -28 X-Mythic-Debug: Threshold = On = Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the following Coccinelle error: ./drivers/thermal/ti-soc-thermal/ti-bandgap.c:1441:1-7: \ ERROR: missing clk_put; clk_get on line 1290 \ and execution via conditional on line 1298 Signed-off-by: Luis Henriques --- drivers/thermal/ti-soc-thermal/ti-bandgap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c index 06ea9766a70a..ba9c302454fb 100644 --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c @@ -1298,7 +1298,7 @@ int ti_bandgap_probe(struct platform_device *pdev) if (IS_ERR(bgp->div_clk)) { dev_err(&pdev->dev, "failed to request div_ts_ck clock ref\n"); ret = PTR_ERR(bgp->div_clk); - goto free_irqs; + goto put_fclock; } for (i = 0; i < bgp->conf->sensor_count; i++) { @@ -1430,8 +1430,9 @@ int ti_bandgap_probe(struct platform_device *pdev) if (TI_BANDGAP_HAS(bgp, CLK_CTRL)) clk_disable_unprepare(bgp->fclock); put_clks: - clk_put(bgp->fclock); clk_put(bgp->div_clk); +put_fclock: + clk_put(bgp->fclock); free_irqs: if (TI_BANDGAP_HAS(bgp, TSHUT)) { free_irq(gpio_to_irq(bgp->tshut_gpio), NULL);