[media] rainshadow-cec: ensure exit_loop is intialized
authorColin Ian King <colin.king@canonical.com>
Fri, 19 May 2017 17:45:15 +0000 (14:45 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 4 Jun 2017 18:23:32 +0000 (15:23 -0300)
exit_loop is not being initialized, so it contains garbage. Ensure it is
initialized to false.

Detected by CoverityScan, CID#1436409 ("Uninitialized scalar variable")

Fixes: ea6a69defd3311 ("[media] rainshadow-cec: avoid -Wmaybe-uninitialized warning")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/rainshadow-cec/rainshadow-cec.c

index 541ca543f71f4efe7e29e7c22bce114c2b18fc3d..71bd68548c9c87d3359a458efe9069c59a81e81a 100644 (file)
@@ -119,7 +119,7 @@ static void rain_irq_work_handler(struct work_struct *work)
 
        while (true) {
                unsigned long flags;
-               bool exit_loop;
+               bool exit_loop = false;
                char data;
 
                spin_lock_irqsave(&rain->buf_lock, flags);