]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
CHROMIUM: media: tuners: init fw and hw ids to 0 in xc4000.c
authorSimon Que <sque@chromium.org>
Wed, 16 Jan 2013 23:23:38 +0000 (15:23 -0800)
committerChromeBot <chrome-bot@google.com>
Mon, 28 Jan 2013 20:42:19 +0000 (12:42 -0800)
In xc4000.c's check_firmware() function, these variables are later
initialized by passing them to xc_get_version() as pointers.  However,
this results in a compile error that these are not initialized since it
is not explicit.

This patch initializes them to zero.  These may or may not be valid
values, but these variables are not used unless xc_get_version() returns
successfully so their initial values aren't important anyway.

I sent this upstream.  It may or may not get accepted, but the directory
structure has changed, so this patch won't apply cleanly when we move to
kernel-next.

BUG=chromium-os:5542
TEST=emerge chromeos-kernel, make sure xc4000.c has no warnings.

Change-Id: I66592ecfb09e36a692329e3ee5c3d1cb3394a2ae
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41473
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
drivers/media/common/tuners/xc4000.c

index 68397110b7d932fec46c3cdd4ecc0b9d2e99ddf4..cb0c7a654f181ef17c45d61fd724f406efe52a1b 100644 (file)
@@ -935,7 +935,8 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type,
        int                        rc = 0, is_retry = 0;
        u16                        hwmodel;
        v4l2_std_id                std0;
-       u8                         hw_major, hw_minor, fw_major, fw_minor;
+       u8                         hw_major = 0, hw_minor = 0;
+       u8                         fw_major = 0, fw_minor = 0;
 
        dprintk(1, "%s called\n", __func__);