diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2022-06-08 04:11:54 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2022-06-10 00:34:08 +0200 |
commit | a1ea0857b59757733d58908dd55bf4b722ee574f (patch) | |
tree | 46b12e6898224c71aee38cbc37609faf86621288 /drivers/clk | |
parent | Linux 5.19-rc1 (diff) | |
download | linux-a1ea0857b59757733d58908dd55bf4b722ee574f.tar.xz linux-a1ea0857b59757733d58908dd55bf4b722ee574f.zip |
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: 637cee5ffc71 ("clk: stm32: Introduce STM32MP13 RCC drivers (Reset Clock Controller)")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20220608021154.990347-1-weiyongjun1@huawei.com
Tested-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Reviewed-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/stm32/reset-stm32.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/stm32/reset-stm32.c b/drivers/clk/stm32/reset-stm32.c index 040870130e4b..e89381528af9 100644 --- a/drivers/clk/stm32/reset-stm32.c +++ b/drivers/clk/stm32/reset-stm32.c @@ -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; |