[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250324061543.15150-1-a.vatoropin@crpt.ru>
Date: Mon, 24 Mar 2025 06:15:49 +0000
From: Ваторопин Андрей
<a.vatoropin@...t.ru>
To: Michael Turquette <mturquette@...libre.com>
CC: Ваторопин Андрей
<a.vatoropin@...t.ru>, Stephen Boyd <sboyd@...nel.org>, Michal Simek
<michal.simek@....com>, Javier Carrasco <javier.carrasco.cruz@...il.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Uwe Kleine-König <u.kleine-koenig@...libre.com>,
"linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "lvc-project@...uxtesting.org"
<lvc-project@...uxtesting.org>
Subject: [PATCH] soc: xilinx: vcu: modify the order of devices unregistration
From: Andrey Vatoropin <a.vatoropin@...t.ru>
The order of registration of 'struct clk_hw' handles in
xvcu_clk_hw_register_leaf() does not correspond the order of
unregistration performed in xvcu_clk_hw_unregister_leaf().
Clean up the order and replace the duplicate !divider check with a more
appropriate one.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Andrey Vatoropin <a.vatoropin@...t.ru>
---
drivers/clk/xilinx/xlnx_vcu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/xilinx/xlnx_vcu.c b/drivers/clk/xilinx/xlnx_vcu.c
index 81501b48412e..e4b08f501958 100644
--- a/drivers/clk/xilinx/xlnx_vcu.c
+++ b/drivers/clk/xilinx/xlnx_vcu.c
@@ -511,11 +511,11 @@ static void xvcu_clk_hw_unregister_leaf(struct clk_hw *hw)
return;
mux = clk_hw_get_parent(divider);
- clk_hw_unregister_mux(mux);
- if (!divider)
+ clk_hw_unregister_divider(divider);
+ if (!mux)
return;
- clk_hw_unregister_divider(divider);
+ clk_hw_unregister_mux(mux);
}
static int xvcu_register_clock_provider(struct xvcu_device *xvcu)
--
2.43.0
Powered by blists - more mailing lists