From: Wei Yongjun Date: Tue, 25 Apr 2017 03:12:46 +0000 (-0300) Subject: [media] rainshadow-cec: Fix missing spin_lock_init() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=be321a82bf8ee2e59734dd0d1fa1183a55a81d5d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/rainshadow-cec/rainshadow-cec.c b/drivers/media/usb/rainshadow-cec/rainshadow-cec.c index 9ddd6a99f066..8d3ca2c8b20f 100644 --- a/drivers/media/usb/rainshadow-cec/rainshadow-cec.c +++ b/drivers/media/usb/rainshadow-cec/rainshadow-cec.c @@ -337,6 +337,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)