From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2E7DFC4332F for ; Tue, 22 Nov 2022 13:46:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Je/l7g1q95T9WUsdZppSLY0H+EE66l3Td+GOWGgYuEE=; b=AgBhfHDHE03dka umNMjQV2jJw+1o9/l5v8qNvRxWXfmn6lBT2vkMlzLf/2q3AQFSE+foAAqNtvClxQFwgwhfO4UYbsz eV9H7FNL4YaPQBKz0LWgLHykHQQkeYup+1a/keogRLm/fpuKgJLBSsKp+iYuE00GwN6CyWLtsD5QA czZI+2B9U99HdQIfq6yvL8Xs/YjLNgrE1QaCTHMf0SLdiduEwedySn4g0osPDHwBv/E/tPZqwBTbX qL3IuRO1gjFRy7TToi7wi5sRZHjtJb9djDsysFTpoX+9bKL15mJM9TFnfN+UsmAXn4c1hJ1D5qvDI JFFkTUK5a833EA3BRJrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxTaT-009iI9-FL; Tue, 22 Nov 2022 13:45:21 +0000 Received: from relay8-d.mail.gandi.net ([217.70.183.201]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxTaP-009iFk-LS for linux-arm-kernel@lists.infradead.org; Tue, 22 Nov 2022 13:45:19 +0000 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id DD7151BF20C; Tue, 22 Nov 2022 13:45:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1669124713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4/zvmVkIjakCyfdAi4wAkE5jMdoJxa8ZztwxunheeDU=; b=BVMsnt3KxZ8Lz/W8GQwC1n34D4/Btx0ZVqxChfaahKVphifHCnLNbtr7o0TyzekUhu6MUj 8GFwpbK3YEi9jGX2m7HXrGSF4JRukANlfj+BOAagjTFCMWM1CrOYr4c2BZ7tjygqHJNC/7 ycrOdb/C1VfpFKi/32Cv65Gt3uHMr/Gqw84Wwu3Bbu4fc0T5KCtC+UBBo1aFE5e8B64dmT apl6yp+TcTuqKUmmt77N0AQSP6thGL8LxqWF4oBkacgNV57y7YczO3VXDs6vz/I7X7iYRm 2YAUnHD1kMVAt9L4/x56vY93jGbE2ZTRygwzHVN+tRKKOSQ/cNuJOYiQ1h3Xbg== Date: Tue, 22 Nov 2022 14:45:11 +0100 From: Alexandre Belloni To: Gaosheng Cui Cc: patrice.chotard@foss.st.com, a.zummo@towertech.it, lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org, linux-rtc@vger.kernel.org Subject: Re: [PATCH] rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe() Message-ID: References: <20221122121907.1648044-1-cuigaosheng1@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221122121907.1648044-1-cuigaosheng1@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221122_054518_012245_0BF66B2F X-CRM114-Status: GOOD ( 16.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 22/11/2022 20:19:07+0800, Gaosheng Cui wrote: > The clk_get_rate() should be called in the error handling of > clk_get_rate(), fix it. > This is not what the patch does > Fixes: b5b2bdfc2893 ("rtc: st: Add new driver for ST's LPC RTC") > Signed-off-by: Gaosheng Cui > --- > drivers/rtc/rtc-st-lpc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/rtc/rtc-st-lpc.c b/drivers/rtc/rtc-st-lpc.c > index bdb20f63254e..0f8e4231098e 100644 > --- a/drivers/rtc/rtc-st-lpc.c > +++ b/drivers/rtc/rtc-st-lpc.c > @@ -238,6 +238,7 @@ static int st_rtc_probe(struct platform_device *pdev) > > rtc->clkrate = clk_get_rate(rtc->clk); > if (!rtc->clkrate) { > + clk_disable_unprepare(rtc->clk); > dev_err(&pdev->dev, "Unable to fetch clock rate\n"); > return -EINVAL; > } > -- > 2.25.1 > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel