Explorar o código

[media] rc-core: Initialize return value to zero

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>
Mauro Carvalho Chehab %!s(int64=15) %!d(string=hai) anos
pai
achega
dea8a39fb5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/media/rc/rc-main.c

+ 1 - 1
drivers/media/rc/rc-main.c

@@ -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);