[tip:,timers/core] clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock()
Message ID | 167060084258.4906.16638898488037471774.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp851186wrr; Fri, 9 Dec 2022 07:51:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf6KW38qtJ/a9P7UCKIRP7rqzpykvqwbTTn3j1n+cz8G5a9zGn7B7oewncHlqfwhnqBCnsqw X-Received: by 2002:a17:906:5250:b0:7ae:825c:92d with SMTP id y16-20020a170906525000b007ae825c092dmr5815067ejm.46.1670601071206; Fri, 09 Dec 2022 07:51:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670601071; cv=none; d=google.com; s=arc-20160816; b=Arhw6AJoA6DMVCrL38MuhhA8OVDEt55kX3UINy9pkHhgpVV0uwdOlbtaTXVak/EQFZ So6FEKIfh7cFwE3rFi1tLbpGvGS0fcR55hluIOt9WfxrxZz0KZZooMeUd6xZxr294TZS C0kLCNPnZTxpUcCBLkZlk0eggNpK8G9pRsjJWKh4T0hKSOvNWJhRBOMuerE9vdr2QB/L wgwzdASCYS5vbiAb5SdF3tf5FWlYqvAheWyhvwEG7qbcCk3L/K7LYZTW2hWE9eHBw/Hp tXNT3k4TWJ5/BLMPyY7rVAeTKk9oqSyE6NiGrcPG/IIdVUaEA9i7//svMgiLAFcu8ysO x30g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=ptf5JucJI9u3RmOJs1YiPXVOdJFaBXojrhh5idR/RN4=; b=n1M0xk8A8nqoUDB2Qp1WSkD7O2y/sKpCc/mcLiE9TYy9FPgv5DFHE+JsuORqhXOGPP NbF4bhSst4ofiZiGiXQwtlAiczLIBVw4w4a/urqVR22Iu6C3Vhd7ymXIEuvaoiEZszBF 8dR8QtpUlzbJd/qeIDxT3ravMaJce3cV1hIVP54yjgO/Qeku4kAaWCLpP0imG8wZuvZe dRxdCwWhbGC1pqXcnPklaCeF7r3EfeA83qp40JQJKJLxpAExl+Orc0m/8i6SzAZv0F4W sPNQhS/sjtz4wZMqwn0U86pK92aCkjQvv/9VfIz2CdKRKxuj03xm5yFATVKaBEj7PREy 5pBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=bNfTGrjG; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd25-20020a1709076e1900b007c0f2d30dadsi116395ejc.76.2022.12.09.07.50.47; Fri, 09 Dec 2022 07:51:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=bNfTGrjG; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230413AbiLIPrn (ORCPT <rfc822;sophiezhao968@gmail.com> + 99 others); Fri, 9 Dec 2022 10:47:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230216AbiLIPrZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 9 Dec 2022 10:47:25 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 633EF379FE; Fri, 9 Dec 2022 07:47:24 -0800 (PST) Date: Fri, 09 Dec 2022 15:47:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670600842; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ptf5JucJI9u3RmOJs1YiPXVOdJFaBXojrhh5idR/RN4=; b=bNfTGrjGpgkCApaF4NH9BaFg3su2rFHipR6iohAGgm6UmH+BRGk/aY1huwkRLnZRqWDhug TFy+Zgt7vf7bSL2eIiypFh7+QN/v1nDxKydYeVmrGBCXcivUbsFUkG/99sxsT9VeDU2kWJ Qy82GwznWCHzaiUtZ4IW/GY+TkQ5ZMXT5CEc++x0cJqxIvpnW6oqbAaRNybD1gq83FGKyB ZsUAnu0Cz2ZfBflDJvhRQVuZQ/PUYHgCUguq7Y7EMCR4FXE0cntgotzjxzwMwUt4yO14PQ r6ds4EjuIN+/wwMkeoJtNCol7Mi+juO4auY17+zY0+mkuhERnbyVW0ZAZagJcA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670600842; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ptf5JucJI9u3RmOJs1YiPXVOdJFaBXojrhh5idR/RN4=; b=/Iq8f1Ok6sfvVh3kkkkI7Bl+kwkHWdVqzy/rta3ImM9ka5FTp0vlqcanrWHr+N1kRC5rsU UfH1J7Xnt+k7BGAA== From: "tip-bot2 for Yang Yingliang" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock() Cc: Yang Yingliang <yangyingliang@huawei.com>, Tony Lindgren <tony@atomide.com>, Daniel Lezcano <daniel.lezcano@kernel.org>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221029114427.946520-1-yangyingliang@huawei.com> References: <20221029114427.946520-1-yangyingliang@huawei.com> MIME-Version: 1.0 Message-ID: <167060084258.4906.16638898488037471774.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751752188811055849?= X-GMAIL-MSGID: =?utf-8?q?1751752188811055849?= |
Series |
[tip:,timers/core] clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock()
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Dec. 9, 2022, 3:47 p.m. UTC
The following commit has been merged into the timers/core branch of tip: Commit-ID: 180d35a7c05d520314a590c99ad8643d0213f28b Gitweb: https://git.kernel.org/tip/180d35a7c05d520314a590c99ad8643d0213f28b Author: Yang Yingliang <yangyingliang@huawei.com> AuthorDate: Sat, 29 Oct 2022 19:44:27 +08:00 Committer: Daniel Lezcano <daniel.lezcano@kernel.org> CommitterDate: Fri, 02 Dec 2022 13:16:46 +01:00 clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock() If clk_get_rate() fails which is called after clk_prepare_enable(), clk_disable_unprepare() need be called in error path to disable the clock in dmtimer_systimer_init_clock(). Fixes: 52762fbd1c47 ("clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20221029114427.946520-1-yangyingliang@huawei.com Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org> --- drivers/clocksource/timer-ti-dm-systimer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-ti-dm-systimer.c b/drivers/clocksource/timer-ti-dm-systimer.c index 2737407..632523c 100644 --- a/drivers/clocksource/timer-ti-dm-systimer.c +++ b/drivers/clocksource/timer-ti-dm-systimer.c @@ -345,8 +345,10 @@ static int __init dmtimer_systimer_init_clock(struct dmtimer_systimer *t, return error; r = clk_get_rate(clock); - if (!r) + if (!r) { + clk_disable_unprepare(clock); return -ENODEV; + } if (is_ick) t->ick = clock;