summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2017-04-25 00:12:46 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-06-06 07:10:01 -0300
commite0f2e5eb14668dc798942ff5f4241d9bd17f9655 (patch)
treec6c273b4ce2817466f23964e33d31ecd13a52015 /drivers/media/usb
parent4b0755e90ae03ba40174842af6fa810355960fbc (diff)
downloadlinux-e0f2e5eb14668dc798942ff5f4241d9bd17f9655.tar.bz2
[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: 0f314f6c2e77 ("[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>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r--drivers/media/usb/rainshadow-cec/rainshadow-cec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/usb/rainshadow-cec/rainshadow-cec.c b/drivers/media/usb/rainshadow-cec/rainshadow-cec.c
index 71bd68548c9c..4126552c9055 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)