Skip to content

Commit

Permalink
b43: fix two warnings
Browse files Browse the repository at this point in the history
My gcc appears to be able to see past the function
boundary and notices that the variable 'behaviour'
could be used uninitialised:

drivers/net/wireless/b43/leds.c: In function ‘b43_leds_register’:
drivers/net/wireless/b43/leds.c:339: warning: ‘behaviour’ may be used uninitialized in this function
drivers/net/wireless/b43/leds.c: In function ‘b43_leds_init’:
drivers/net/wireless/b43/leds.c:262: warning: ‘behaviour’ may be used uninitialized in this function

because b43_led_get_sprominfo() didn't initialise
it in all cases.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Dec 4, 2009
1 parent 52ce3e9 commit df98a49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/b43/leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ static void b43_led_get_sprominfo(struct b43_wldev *dev,
*behaviour = B43_LED_OFF;
break;
default:
*behaviour = B43_LED_OFF;
B43_WARN_ON(1);
return;
}
Expand Down

0 comments on commit df98a49

Please sign in to comment.