Input: ir-keytable - fix uninitialized variable warning
We were forgetting to set up proper return value in success path causing ir_getkeycode() to fail intermittently: drivers/media/IR/ir-keytable.c: In function 'ir_getkeycode': drivers/media/IR/ir-keytable.c:363: warning: 'retval' may be used uninitialized in this function Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
50440c6dcc
commit
47c5ba53bc
1 changed files with 2 additions and 0 deletions
|
@ -389,6 +389,8 @@ static int ir_getkeycode(struct input_dev *dev,
|
|||
ke->len = sizeof(entry->scancode);
|
||||
memcpy(ke->scancode, &entry->scancode, sizeof(entry->scancode));
|
||||
|
||||
retval = 0;
|
||||
|
||||
out:
|
||||
spin_unlock_irqrestore(&rc_tab->lock, flags);
|
||||
return retval;
|
||||
|
|
Loading…
Reference in a new issue