]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
CHROMIUM: USB: serial: keyspan.c: initialize fw
authorMandeep Singh Baines <msb@chromium.org>
Mon, 7 Jan 2013 21:53:30 +0000 (13:53 -0800)
committerChromeBot <chrome-bot@google.com>
Tue, 8 Jan 2013 21:46:50 +0000 (13:46 -0800)
The fw variable is initialized in request_ihex_firmware in the
non-failure case but the compiler is not smart enough to pick
this up so fixing this way.

Fixes the following warning:
drivers/usb/serial/keyspan.c:1298:18: warning: 'fw' may be used uninitialized in this function [-Wmaybe-uninitialized]

BUG=chromium-os:5542
TEST=compile

Change-Id: Id89b68bf4cc061b83615f8db52d2a80e6e9e5cb5
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40569
Reviewed-by: Grant Grundler <grundler@chromium.org>
drivers/usb/serial/keyspan.c

index a39ddd1b0dcac5e61149adb35bc056cb4b943940..1b24324f1e60e2fdcd5d63b38ee5d2a8b7527514 100644 (file)
@@ -1203,7 +1203,7 @@ static int keyspan_fake_startup(struct usb_serial *serial)
        int                             response;
        const struct ihex_binrec        *record;
        char                            *fw_name;
-       const struct firmware           *fw;
+       const struct firmware           *fw = NULL;
 
        dbg("Keyspan startup version %04x product %04x",
            le16_to_cpu(serial->dev->descriptor.bcdDevice),