From: Simon Que Date: Wed, 16 Jan 2013 23:23:38 +0000 (-0800) Subject: CHROMIUM: media: tuners: init fw and hw ids to 0 in xc4000.c X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f309ffa4918f7c7f840c6561918d766654bd11fb;p=people%2Faperard%2Flinux-chromebook.git CHROMIUM: media: tuners: init fw and hw ids to 0 in xc4000.c 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 Reviewed-on: https://gerrit.chromium.org/gerrit/41473 Reviewed-by: Mandeep Singh Baines --- diff --git a/drivers/media/common/tuners/xc4000.c b/drivers/media/common/tuners/xc4000.c index 68397110b7d93..cb0c7a654f181 100644 --- a/drivers/media/common/tuners/xc4000.c +++ b/drivers/media/common/tuners/xc4000.c @@ -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__);