On Sunday, October 31, 2010 10:51:21 am Stefan Richter wrote: > 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. > The patch below should fix it. I wonder if Linus released -rc1 yet... -- Dmitry Input: ir-keytable - fix uninitialized variable warning From: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxx> Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx> --- drivers/media/IR/ir-keytable.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index 9186b45..f7fafff 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, 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; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html