[PATCH -next] clk: stm32mp1: fix missing spin_lock_init()

Subsystems: common clk framework, the rest

STALE1861d LANDED

Landed in mainline as b1f247714acb on 2021-06-30.

2 messages, 2 authors, 2021-06-30 · open the first message on its own page

[PATCH -next] clk: stm32mp1: fix missing spin_lock_init()

From: Wang Hai <hidden>
Date: 2021-06-30 01:59:30

The driver allocates the spinlock but not initialize it.
Use spin_lock_init() on it to initialize it correctly.

Fixes: c392df194a2d ("clk: stm32mp1: move RCC reset controller into RCC clock driver")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Wang Hai <redacted>
---
 drivers/clk/clk-stm32mp1.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/clk/clk-stm32mp1.c b/drivers/clk/clk-stm32mp1.c
index 6adc625e79c..256575bd29b 100644
--- a/drivers/clk/clk-stm32mp1.c
+++ b/drivers/clk/clk-stm32mp1.c
@@ -2263,6 +2263,7 @@ static int stm32_rcc_reset_init(struct device *dev, void __iomem *base,
 	if (!reset_data)
 		return -ENOMEM;
 
+	spin_lock_init(&reset_data->lock);
 	reset_data->membase = base;
 	reset_data->rcdev.owner = THIS_MODULE;
 	reset_data->rcdev.ops = &stm32_reset_ops;
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH -next] clk: stm32mp1: fix missing spin_lock_init()

From: Stephen Boyd <sboyd@kernel.org>
Date: 2021-06-30 18:17:28

Quoting Wang Hai (2021-06-29 18:58:23)
The driver allocates the spinlock but not initialize it.
Use spin_lock_init() on it to initialize it correctly.

Fixes: c392df194a2d ("clk: stm32mp1: move RCC reset controller into RCC clock driver")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Wang Hai <redacted>
---
Applied to clk-next

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help