From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF2C648F84C; Sat, 12 Sep 2026 19:13:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789240405; cv=none; b=LdaEGVVOX5ugiWgOX3HGdi0TobF+gUD2XpamG3/citjfL3b7HJYDz7Eq5G41D/JZRPybqihzi7upqfBiuii56FCuJfHcCi2TnxFiJYv/mqvNwC7KlwIrCxZ6ReuhpBJQ+3FRw1Lwr+vKZxgP96VbDD3+6/jNqwN8NYmq7juwRQA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789240405; c=relaxed/simple; bh=xXUIjd6puE7zz/IqlLTqPH+wmlGDkh6pY4XBvkiujtY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EPxB28w5b9Zj1UfKbL9hkGRlPfB1wyTM3CeiBcJJz6lrRiYg1IE5ELA0MbQDBC3/KEptau9JLwUz+7X8n4Fjz+sHokBEYvd0e2k83NQJwRPbJtIowHVx1VWDHElXA9MyoAmuK33s3xG0a8MEhd+pKsuBD7KiuEBnPMp3Z+fDAtY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ghUzG5NQ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ghUzG5NQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBB7C1F000FF; Sat, 12 Sep 2026 19:13:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789240403; bh=ypYQ2WfFeObjowjZb4zt4WId6+m1cTJtyj+gsdaFtgQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ghUzG5NQCsBLv0d6adSd2Dr7gvbBwdgYMR9gCaU7gHu4a3ZPXlIp2K21F5Q9L0xqN 50KJ+AfT0tHVjq9BsG9sM8RL8My29P0RvBZyt/2ZisdUnpOYNUfTj/vslhoYGT1YO6 b1wiLTYQlRjCtFLy+kmP3fZpQsS3JuloJ7WNedJs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yuho Choi , Daniel Lezcano , Sasha Levin Subject: [PATCH 5.15 818/935] clocksource/drivers/armada: Unwind timer clock on init failure Date: Sat, 12 Sep 2026 09:04:08 +0200 Message-ID: <20260912065545.593348830@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065526.833703348@linuxfoundation.org> References: <20260912065526.833703348@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yuho Choi [ Upstream commit 8b4127f6db40381229f3564d34ac35f36311c201 ] The Armada timer init paths enable their clock before calling the common initialization routine. If that routine returns an error, the clock is left enabled even though the timer was not initialized successfully. Fixes: 12549e27c63c ("clocksource/drivers/time-armada-370-xp: Convert init function to return error") Signed-off-by: Yuho Choi Signed-off-by: Daniel Lezcano Link: https://patch.msgid.link/20260802213545.565913-1-dbgh9129@gmail.com Signed-off-by: Sasha Levin --- drivers/clocksource/timer-armada-370-xp.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/timer-armada-370-xp.c b/drivers/clocksource/timer-armada-370-xp.c index e3acc3c631b72..a3e803fb8b1ee 100644 --- a/drivers/clocksource/timer-armada-370-xp.c +++ b/drivers/clocksource/timer-armada-370-xp.c @@ -349,7 +349,11 @@ static int __init armada_xp_timer_init(struct device_node *np) timer_clk = clk_get_rate(clk); - return armada_370_xp_timer_common_init(np); + ret = armada_370_xp_timer_common_init(np); + if (ret) + clk_disable_unprepare(clk); + + return ret; } TIMER_OF_DECLARE(armada_xp, "marvell,armada-xp-timer", armada_xp_timer_init); @@ -387,7 +391,11 @@ static int __init armada_375_timer_init(struct device_node *np) timer25Mhz = false; } - return armada_370_xp_timer_common_init(np); + ret = armada_370_xp_timer_common_init(np); + if (ret) + clk_disable_unprepare(clk); + + return ret; } TIMER_OF_DECLARE(armada_375, "marvell,armada-375-timer", armada_375_timer_init); @@ -410,7 +418,11 @@ static int __init armada_370_timer_init(struct device_node *np) timer_clk = clk_get_rate(clk) / TIMER_DIVIDER; timer25Mhz = false; - return armada_370_xp_timer_common_init(np); + ret = armada_370_xp_timer_common_init(np); + if (ret) + clk_disable_unprepare(clk); + + return ret; } TIMER_OF_DECLARE(armada_370, "marvell,armada-370-timer", armada_370_timer_init); -- 2.53.0