From: Tim Gardner Date: Sun, 10 Mar 2013 16:58:21 +0000 (-0600) Subject: ASoC: wm_hubs: Silence reg_r and reg_l 'may be used uninitialized' warnings X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=030ee68b4938cb7fc0bad3f000c87fcc8364ad75;hp=030ee68b4938cb7fc0bad3f000c87fcc8364ad75 ASoC: wm_hubs: Silence reg_r and reg_l 'may be used uninitialized' warnings commit 1f5353e765fe2a1168477bfe55e4dd7cdd96b477 upstream. Return an error from wm_hubs_read_dc_servo() if hubs->dcs_readback_mode is not correctly initialized. You might as well bail out since nothing is likely to work correctly afterwards. sound/soc/codecs/wm_hubs.c:321:11: warning: 'reg_r' may be used uninitialized in this function [-Wuninitialized] sound/soc/codecs/wm_hubs.c:251:13: note: 'reg_r' was declared here sound/soc/codecs/wm_hubs.c:322:11: warning: 'reg_l' may be used uninitialized in this function [-Wuninitialized] sound/soc/codecs/wm_hubs.c:251:6: note: 'reg_l' was declared here gcc version 4.6.3 Signed-off-by: Tim Gardner Signed-off-by: Mark Brown [bwh: Backported to 3.2: There's no separate wm_hubs_read_dc_servo() function, so return directly from calibrate_dc_servo().] Signed-off-by: Ben Hutchings ---