Commit a1ea0857 authored by Wei Yongjun's avatar Wei Yongjun Committed by Stephen Boyd

clk: stm32: rcc_reset: 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: 637cee5f ("clk: stm32: Introduce STM32MP13 RCC drivers (Reset Clock Controller)")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20220608021154.990347-1-weiyongjun1@huawei.comTested-by: default avatarGabriel Fernandez <gabriel.fernandez@foss.st.com>
Reviewed-by: default avatarGabriel Fernandez <gabriel.fernandez@foss.st.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent f2906aa8
......@@ -111,6 +111,7 @@ int stm32_rcc_reset_init(struct device *dev, const struct of_device_id *match,
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment