Re: [PATCH] drivers/platform/x86/eeepc-wmi.c: fix build warning

From: Corentin Chary
Date: Wed May 19 2010 - 08:06:55 EST


On Wed, May 19, 2010 at 12:37 PM, Daniel Mack <daniel@xxxxxxxx> wrote:
> 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@xxxxxxxx>
> Cc: Matthew Garrett <mjg@xxxxxxxxxx>
> Cc: Yong Wang <yong.y.wang@xxxxxxxxx>
> Cc: Corentin Chary <corentincj@xxxxxxxxxx>
> Cc: Dmitry Torokhov <dtor@xxxxxxx>
> Cc: Tejun Heo <tj@xxxxxxxxxx>
> Cc: platform-driver-x86@xxxxxxxxxxxxxxx
> ---
>  drivers/platform/x86/eeepc-wmi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
> index b227eb4..9dc50fb 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;
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Acked-By: Corentin Chary <corentincj@xxxxxxxxxx>

--
Corentin Chary
http://xf.iksaif.net
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/