* [PATCH -next] [media] rainshadow-cec: Fix missing spin_lock_init()
@ 2017-04-25 3:12 Wei Yongjun
0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2017-04-25 3:12 UTC (permalink / raw)
To: Hans Verkuil, Mauro Carvalho Chehab; +Cc: Wei Yongjun, linux-media
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.
Fixes: 0f314f6c2e77 ("[media] rainshadow-cec: new RainShadow Tech HDMI
CEC driver")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/media/usb/rainshadow-cec/rainshadow-cec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/usb/rainshadow-cec/rainshadow-cec.c b/drivers/media/usb/rainshadow-cec/rainshadow-cec.c
index 541ca54..8f562ed 100644
--- a/drivers/media/usb/rainshadow-cec/rainshadow-cec.c
+++ b/drivers/media/usb/rainshadow-cec/rainshadow-cec.c
@@ -336,6 +336,7 @@ static int rain_connect(struct serio *serio, struct serio_driver *drv)
serio_set_drvdata(serio, rain);
INIT_WORK(&rain->work, rain_irq_work_handler);
mutex_init(&rain->write_lock);
+ spin_lock_init(&rain->buf_lock);
err = serio_open(serio, drv);
if (err)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-04-25 3:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-25 3:12 [PATCH -next] [media] rainshadow-cec: Fix missing spin_lock_init() Wei Yongjun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox