From patchwork Mon Aug 21 16:00:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 9913111 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 6D953602A0 for ; Mon, 21 Aug 2017 16:01:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64284287B3 for ; Mon, 21 Aug 2017 16:01:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 590E7287B7; Mon, 21 Aug 2017 16:01:15 +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=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DCFA9287B3 for ; Mon, 21 Aug 2017 16:01:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=UbiwVF38oPCpJV46Rh5L6/Wf+SBLAhDJY7c4fxFib2M=; b=sx3 5/L3ms1yguWsCxYFAvJ29zdiA9/Rt8VGj/gLSlhlAb5l7CI0zmUG9fAr3a5YBUn/D/nzIH60MenDx IManTz40gTbqiMOPu1nStgP3iLDAMITcaodrNJ8VUW+FBKGawUTFTdtnDM3DKvofQNt1HJruFN/0L lESdU6P+xihWEs8cAMy+NBpLWKmNSFsqtC8kScHesOQttJH2l30LAtoVhyluxJv6C6SUGajQN5tiV dVad530ZNE3wpl5oqXDW0SmKFzBs/4GhFh3I5r4Tv/0LCQepd5n3EEC4nHx5rXZQEoJeTXpkgKn1S KAbCd80uV3ATpdJE7sUJF2tCFSJSjUw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1djp8Y-0000nW-89; Mon, 21 Aug 2017 16:01:10 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1djp8P-0000eB-UX for linux-arm-kernel@lists.infradead.org; Mon, 21 Aug 2017 16:01:08 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 1418223054; Mon, 21 Aug 2017 18:00:40 +0200 (CEST) Received: from localhost (unknown [88.191.26.124]) by mail.free-electrons.com (Postfix) with ESMTPSA id E6CFD2304D; Mon, 21 Aug 2017 18:00:39 +0200 (CEST) From: Alexandre Belloni To: linux-rtc@vger.kernel.org Subject: [PATCH] rtc: sa1100: fix unbalanced clk_prepare_enable/clk_disable_unprepare Date: Mon, 21 Aug 2017 18:00:38 +0200 Message-Id: <20170821160038.22650-1-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 2.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170821_090102_186484_21FCD5D6 X-CRM114-Status: GOOD ( 10.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Alexandre Belloni , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In the error path of sa1100_rtc_open(), info->clk is disabled which will happen again in sa1100_rtc_remove() when the module is removed whereas it is only enabled once in sa1100_rtc_init(). Fixes: 0cc0c38e9139 ("drivers/rtc/rtc-sa1100.c: move clock enable/disable to probe/remove") Signed-off-by: Alexandre Belloni Acked-by: Robert Jarzmik --- drivers/rtc/rtc-sa1100.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c index c2187bf6c7e4..fe8ebf47bbe5 100644 --- a/drivers/rtc/rtc-sa1100.c +++ b/drivers/rtc/rtc-sa1100.c @@ -104,7 +104,7 @@ static int sa1100_rtc_open(struct device *dev) ret = request_irq(info->irq_1hz, sa1100_rtc_interrupt, 0, "rtc 1Hz", dev); if (ret) { dev_err(dev, "IRQ %d already in use.\n", info->irq_1hz); - goto fail_ui; + return ret; } ret = request_irq(info->irq_alarm, sa1100_rtc_interrupt, 0, "rtc Alrm", dev); if (ret) { @@ -118,8 +118,6 @@ static int sa1100_rtc_open(struct device *dev) fail_ai: free_irq(info->irq_1hz, dev); - fail_ui: - clk_disable_unprepare(info->clk); return ret; }