Commit be321a82 authored by Wei Yongjun's avatar Wei Yongjun Committed by Mauro Carvalho Chehab

[media] rainshadow-cec: Fix missing spin_lock_init()

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: 0f314f6c ("[media] rainshadow-cec: new RainShadow Tech HDMI
CEC driver")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent e3b4d10c
...@@ -337,6 +337,7 @@ static int rain_connect(struct serio *serio, struct serio_driver *drv) ...@@ -337,6 +337,7 @@ static int rain_connect(struct serio *serio, struct serio_driver *drv)
serio_set_drvdata(serio, rain); serio_set_drvdata(serio, rain);
INIT_WORK(&rain->work, rain_irq_work_handler); INIT_WORK(&rain->work, rain_irq_work_handler);
mutex_init(&rain->write_lock); mutex_init(&rain->write_lock);
spin_lock_init(&rain->buf_lock);
err = serio_open(serio, drv); err = serio_open(serio, drv);
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment