aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-10-31 18:18:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-31 21:05:43 -0400
commit47c5ba53bc5e5f88b5d1bbb97acd25afc27f74eb (patch)
tree2255f8b182494f0af2681b94396c1212d8094955 /drivers/media
parent50440c6dcccbf90ee3629407cb13ca09cab7d900 (diff)
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>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/IR/ir-keytable.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c
index 647d52b1a1b7..f60107c3b091 100644
--- a/drivers/media/IR/ir-keytable.c
+++ b/drivers/media/IR/ir-keytable.c
@@ -389,6 +389,8 @@ static int ir_getkeycode(struct input_dev *dev,
389 ke->len = sizeof(entry->scancode); 389 ke->len = sizeof(entry->scancode);
390 memcpy(ke->scancode, &entry->scancode, sizeof(entry->scancode)); 390 memcpy(ke->scancode, &entry->scancode, sizeof(entry->scancode));
391 391
392 retval = 0;
393
392out: 394out:
393 spin_unlock_irqrestore(&rc_tab->lock, flags); 395 spin_unlock_irqrestore(&rc_tab->lock, flags);
394 return retval; 396 return retval;