From: Connor Hansen Date: Sat, 11 Jun 2011 18:59:30 +0000 (+0200) Subject: drivers/ssb/driver_chipcommon_pmu.c: uninitilized warning X-Git-Tag: MMI-PSA29.97-13-9~18350^2~12^2~42^2~420 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eb40e3e8bb453519ae17d42e7cab6bdd2b4b9fc5;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drivers/ssb/driver_chipcommon_pmu.c: uninitilized warning warning message drivers/ssb/driver_chipcommon_pmu.c: In function ssb_pmu_resources_init drivers/ssb/driver_chipcommon_pmu.c:420:15: warning: updown_tab_size may be used uninitilized in this function. updown_tab_size and depend_tab_size may not be set in the bus->chip_id switch statement, so set to 0 by default to avoid using uninitialized stack space. Signed-off-by: Connor Hansen Signed-off-by: Michael Buesch Signed-off-by: John W. Linville --- diff --git a/drivers/ssb/driver_chipcommon_pmu.c b/drivers/ssb/driver_chipcommon_pmu.c index 305ade7825f7..a7aef47bf739 100644 --- a/drivers/ssb/driver_chipcommon_pmu.c +++ b/drivers/ssb/driver_chipcommon_pmu.c @@ -417,9 +417,9 @@ static void ssb_pmu_resources_init(struct ssb_chipcommon *cc) u32 min_msk = 0, max_msk = 0; unsigned int i; const struct pmu_res_updown_tab_entry *updown_tab = NULL; - unsigned int updown_tab_size; + unsigned int updown_tab_size = 0; const struct pmu_res_depend_tab_entry *depend_tab = NULL; - unsigned int depend_tab_size; + unsigned int depend_tab_size = 0; switch (bus->chip_id) { case 0x4312: