Skip to contentSkip to conversation

clk: stm32mp1: fix missing spin_lock_init()

PATCH Applied Wang Hai 2 participants 2 messages Jun 30, 2021

Subsystems (2)
lore
Share & tools
lore

Wang Hai

author
#0 lore raw

PATCH 1/1 clk: stm32mp1: fix missing spin_lock_init()

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")
---
 drivers/clk/clk-stm32mp1.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/clk-stm32mp1.c +1 -0
index 6adc625e79c..256575bd29b 100644
@@ -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;
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw

Quoting Wang Hai (2021-06-29 18:58:23)

Quoted 7 lines

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")

---

Applied to clk-next