From: Daniel Mack Date: Wed, 19 May 2010 10:37:01 +0000 (+0200) Subject: drivers/platform/x86/eeepc-wmi.c: fix build warning X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b7670ed6509f322713bbd96eed0301c322f2ae02;p=linux-beck.git drivers/platform/x86/eeepc-wmi.c: fix build warning drivers/platform/x86/eeepc-wmi.c: In function ‘eeepc_wmi_notify’: drivers/platform/x86/eeepc-wmi.c:209: warning: ‘new’ may be used uninitialized in this function drivers/platform/x86/eeepc-wmi.c:209: note: ‘new’ was declared here Signed-off-by: Daniel Mack Cc: Matthew Garrett Cc: Yong Wang Cc: Corentin Chary Cc: Dmitry Torokhov Cc: Tejun Heo Cc: platform-driver-x86@vger.kernel.org Acked-By: Corentin Chary Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c index b227eb469f49..9dc50fbf3d0b 100644 --- a/drivers/platform/x86/eeepc-wmi.c +++ b/drivers/platform/x86/eeepc-wmi.c @@ -206,7 +206,7 @@ static int eeepc_wmi_backlight_notify(struct eeepc_wmi *eeepc, int code) { struct backlight_device *bd = eeepc->backlight_device; int old = bd->props.brightness; - int new; + int new = old; if (code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNUP_MAX) new = code - NOTIFY_BRNUP_MIN + 1;