2010-11-02 16:05:03

by Jarod Wilson

[permalink] [raw]
Subject: Re: drivers/media/IR/ir-keytable.c::ir_getkeycode - 'retval' may be used uninitialized

On Sun, Oct 31, 2010 at 6:18 PM, Dmitry Torokhov
<[email protected]> wrote:
> 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...

Looks like it missed rc1.

> 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]>

Acked-by: Jarod Wilson <[email protected]>


--
Jarod Wilson
[email protected]


2010-11-02 16:24:45

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: drivers/media/IR/ir-keytable.c::ir_getkeycode - 'retval' may be used uninitialized

On Tue, Nov 02, 2010 at 12:04:56PM -0400, Jarod Wilson wrote:
> On Sun, Oct 31, 2010 at 6:18 PM, Dmitry Torokhov
> <[email protected]> wrote:
> > 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...
>
> Looks like it missed rc1.
>

Nope, I see it there, 47c5ba53bc5e5f88b5d1bbb97acd25afc27f74eb ;)

--
Dmitry

2010-11-02 20:21:24

by Jarod Wilson

[permalink] [raw]
Subject: Re: drivers/media/IR/ir-keytable.c::ir_getkeycode - 'retval' may be used uninitialized

On Tue, Nov 2, 2010 at 12:24 PM, Dmitry Torokhov
<[email protected]> wrote:
> On Tue, Nov 02, 2010 at 12:04:56PM -0400, Jarod Wilson wrote:
>> On Sun, Oct 31, 2010 at 6:18 PM, Dmitry Torokhov
>> <[email protected]> wrote:
>> > 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...
>>
>> Looks like it missed rc1.
>>
>
> Nope, I see it there, 47c5ba53bc5e5f88b5d1bbb97acd25afc27f74eb ;)

Oh, damn. Sorry for the noise... I blame it on my cold... :)

--
Jarod Wilson
[email protected]