Skip to content

Commit

Permalink
[media] rainshadow-cec: Fix missing spin_lock_init()
Browse files Browse the repository at this point in the history
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: 0f314f6 ("[media] rainshadow-cec: new RainShadow Tech HDMI
CEC driver")

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
  • Loading branch information
Wei Yongjun authored and Mauro Carvalho Chehab committed Jun 6, 2017
1 parent 4b0755e commit e0f2e5e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/usb/rainshadow-cec/rainshadow-cec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e0f2e5e

Please sign in to comment.