[PATCH -next] clk: stm32: rcc_reset: Fix missing spin_lock_init()

Gabriel FERNANDEZ gabriel.fernandez at foss.st.com
Thu Jun 9 05:24:18 PDT 2022


Hi Wei Yongjun,

Thank's,

you can add tested-by and reviewed-by Gabriel Fernandez 
<gabriel.fernandez at foss.st.com>

Best Regards

Gabriel Fernandez


On 6/8/22 04:11, Wei Yongjun wrote:
> 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 at huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1 at huawei.com>
> ---
>   drivers/clk/stm32/reset-stm32.c | 1 +
>   1 file changed, 1 insertion(+)
>
> 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;
>



More information about the linux-arm-kernel mailing list