All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] pwm: meson: Fix missing spin_lock_init()
@ 2016-09-10  6:38 ` Wei Yongjun
  0 siblings, 0 replies; 9+ messages in thread
From: Wei Yongjun @ 2016-09-10  6:38 UTC (permalink / raw)
  To: linus-amlogic

From: Wei Yongjun <weiyongjun1@huawei.com>

The driver allocates the spinlock but not initialize it.
Use spin_lock_init() on it to initialize it correctly.

This is detected by Coccinelle semantic patch.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/pwm/pwm-meson.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index bfbbe7f..778d088 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -465,6 +465,7 @@ static int meson_pwm_probe(struct platform_device *pdev)
 	if (IS_ERR(meson->base))
 		return PTR_ERR(meson->base);
 
+	spin_lock_init(&meson->lock);
 	meson->chip.dev = &pdev->dev;
 	meson->chip.ops = &meson_pwm_ops;
 	meson->chip.base = -1;

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

end of thread, other threads:[~2016-10-21  7:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-10  6:38 [PATCH -next] pwm: meson: Fix missing spin_lock_init() Wei Yongjun
2016-09-10  6:38 ` Wei Yongjun
2016-09-10  6:38 ` Wei Yongjun
2016-09-10 13:54 ` Neil Armstrong
2016-09-10 13:54   ` Neil Armstrong
2016-09-10 13:54   ` Neil Armstrong
2016-10-21  7:11   ` Thierry Reding
2016-10-21  7:11     ` Thierry Reding
2016-10-21  7:11     ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.