drivers/platform/x86/eeepc-wmi.c: fix build warning
authorDaniel Mack <daniel@caiaq.de>
Wed, 19 May 2010 10:37:01 +0000 (12:37 +0200)
committerMatthew Garrett <mjg@redhat.com>
Thu, 20 May 2010 13:46:24 +0000 (09:46 -0400)
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 <daniel@caiaq.de>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Yong Wang <yong.y.wang@intel.com>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Tejun Heo <tj@kernel.org>
Cc: platform-driver-x86@vger.kernel.org
Acked-By: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/eeepc-wmi.c

index b227eb4..9dc50fb 100644 (file)
@@ -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;