Skip to content

Commit

Permalink
ath6kl: fix compiler warning in ath6kl_init_hw_params()
Browse files Browse the repository at this point in the history
Both Luis and John reported that they see a compiler warning:

drivers/net/wireless/ath/ath6kl/init.c: In function 'ath6kl_init_hw_params':
drivers/net/wireless/ath/ath6kl/init.c:1377:26: warning: ‘hw’
may be used uninitialized in this function

Oddly enough I have never seen it. But AFAICT the code is correct and
hw is not used uninitalized so add uninitialized_var() to inform that to
the compiler.

Reported-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Kalle Valo committed Feb 2, 2012
1 parent 3c325fb commit 1b46dc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath6kl/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@ static int ath6kl_init_upload(struct ath6kl *ar)

int ath6kl_init_hw_params(struct ath6kl *ar)
{
const struct ath6kl_hw *hw;
const struct ath6kl_hw *uninitialized_var(hw);
int i;

for (i = 0; i < ARRAY_SIZE(hw_list); i++) {
Expand Down

0 comments on commit 1b46dc0

Please sign in to comment.