linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] clk: stm32mp1: fix missing spin_lock_init()
@ 2021-06-30  1:58 Wang Hai
  2021-06-30 18:17 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Hai @ 2021-06-30  1:58 UTC (permalink / raw)
  To: mturquette, sboyd, mcoquelin.stm32, alexandre.torgue, gabriel.fernandez
  Cc: linux-clk, linux-stm32, linux-arm-kernel, linux-kernel

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 <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] clk: stm32mp1: fix missing spin_lock_init()
  2021-06-30  1:58 [PATCH -next] clk: stm32mp1: fix missing spin_lock_init() Wang Hai
@ 2021-06-30 18:17 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2021-06-30 18:17 UTC (permalink / raw)
  To: Wang Hai, alexandre.torgue, gabriel.fernandez, mcoquelin.stm32,
	mturquette
  Cc: linux-clk, linux-stm32, linux-arm-kernel, linux-kernel

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 <hulkci@huawei.com>
> Signed-off-by: Wang Hai <wanghai38@huawei.com>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-30 18:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30  1:58 [PATCH -next] clk: stm32mp1: fix missing spin_lock_init() Wang Hai
2021-06-30 18:17 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).