drivers/media/IR/ir-keytable.c::ir_getkeycode - 'retval' may be used uninitialized
Commit 9f470095068e "Input: media/IR - switch to using new keycode interface" added the following build warning:
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
It is due to an actual bug but I don't know the fix.
Signature · 3 lines
Stefan Richter -=====-==-=- =-=- ===== http://arcgraph.de/sr/
Quoted 8 lines · Stefan Richter
Commit
9f470095068e"Input: media/IR - switch to using new keycode interface" added the following build warning:
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 functionIt is due to an actual bug but I don't know the fix.
The patch below should fix it. I wonder if Linus released -rc1 yet...
Signature · 19 lines
Dmitry Input: ir-keytable - fix uninitialized variable warning From: Dmitry Torokhov <[email protected]> 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 <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> --- drivers/media/IR/ir-keytable.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/media/IR/ir-keytable.c +2 -0
@@ -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;
Jarod Wilson
Acked-byQuoted 11 lines · Dmitry Torokhov
Quoted 8 lines · Stefan Richter
Commit
9f470095068e"Input: media/IR - switch to using new keycode interface" added the following build warning:
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 functionIt is due to an actual bug but I don't know the fix.
The patch below should fix it. I wonder if Linus released -rc1 yet...
Looks like it missed rc1.
Quoted 7 lines
Input: ir-keytable - fix uninitialized variable warning
From: Dmitry Torokhov <[email protected]>
We were forgetting to set up proper return value in success path causing
ir_getkeycode()to fail intermittently:
Quoted 6 lines
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 functionReported-by Stefan Richter <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>
Signature · 2 lines
Jarod Wilson [email protected]
Quoted 9 lines · Jarod Wilson
Quoted 7 lines · Dmitry Torokhov
Quoted 6 lines · Stefan Richter
Commit
9f470095068e"Input: media/IR - switch to using new keycode interface" added the following build warning:
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
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
It is due to an actual bug but I don't know the fix.
The patch below should fix it. I wonder if Linus released -rc1 yet...
Looks like it missed rc1.
Nope, I see it there, 47c5ba53bc5e5f88b5d1bbb97acd25afc27f74eb ;)
Signature · 1 line
Dmitry
Quoted 13 lines · Dmitry Torokhov
Quoted 12 lines · Jarod Wilson
Quoted 10 lines · Dmitry Torokhov
Quoted 8 lines · Stefan Richter
Commit
9f470095068e"Input: media/IR - switch to using new keycode interface" added the following build warning:
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 functionIt is due to an actual bug but I don't know the fix.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
The patch below should fix it. I wonder if Linus released -rc1 yet...
Looks like it missed rc1.
Nope, I see it there,
47c5ba53bc5e5f88b5d1bbb97acd25afc27f74eb;)
Oh, damn. Sorry for the noise... I blame it on my cold... :)
Signature · 2 lines
Jarod Wilson [email protected]