Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753993Ab0KBQFD (ORCPT ); Tue, 2 Nov 2010 12:05:03 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:38756 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752111Ab0KBQE6 (ORCPT ); Tue, 2 Nov 2010 12:04:58 -0400 MIME-Version: 1.0 X-Originating-IP: [66.187.233.202] In-Reply-To: <201010311518.42998.dmitry.torokhov@gmail.com> References: <201010311518.42998.dmitry.torokhov@gmail.com> Date: Tue, 2 Nov 2010 12:04:56 -0400 Message-ID: Subject: Re: drivers/media/IR/ir-keytable.c::ir_getkeycode - 'retval' may be used uninitialized From: Jarod Wilson To: Dmitry Torokhov Cc: Stefan Richter , Linus Torvalds , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, mchehab@redhat.com Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1429 Lines: 41 On Sun, Oct 31, 2010 at 6:18 PM, Dmitry Torokhov 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 > > 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 > Signed-off-by: Dmitry Torokhov Acked-by: Jarod Wilson -- Jarod Wilson jarod@wilsonet.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/