[media] rc-core: Initialize return value to zero
authorMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 29 Nov 2010 10:46:13 +0000 (07:46 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 29 Dec 2010 10:16:58 +0000 (08:16 -0200)
At ir_setkeycode, if INPUT_KEYMAP_BY_INDEX is used, the routine may return
an invalid value if not error.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/rc-main.c

index 6bdd0d3c02e8ae83441023f452f2a2e5247d2576..72be8a02118cc7cbb9440a7baab9fa8128930dc1 100644 (file)
@@ -325,7 +325,7 @@ static int ir_setkeycode(struct input_dev *idev,
        struct rc_map *rc_map = &rdev->rc_map;
        unsigned int index;
        unsigned int scancode;
-       int retval;
+       int retval = 0;
        unsigned long flags;
 
        spin_lock_irqsave(&rc_map->lock, flags);