Skip to content

Commit

Permalink
drivers/ssb/driver_chipcommon_pmu.c: uninitilized warning
Browse files Browse the repository at this point in the history
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 <cmdkhh@gmail.com>
Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Connor Hansen authored and John W. Linville committed Jun 17, 2011
1 parent a6af1d8 commit eb40e3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ssb/driver_chipcommon_pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit eb40e3e

Please sign in to comment.