From: Mauro Carvalho Chehab Date: Mon, 29 Nov 2010 10:46:13 +0000 (-0300) Subject: [media] rc-core: Initialize return value to zero X-Git-Tag: firefly_0821_release~7613^2~3116^2~130 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dea8a39fb569c23084c857ccdbf70a95ea3bf7dc;p=firefly-linux-kernel-4.4.55.git [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 --- diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 6bdd0d3c02e8..72be8a02118c 100644 --- a/drivers/media/rc/rc-main.c +++ b/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);