diff options
author | Andi Kleen <andi@firstfloor.org> | 2012-09-03 16:15:36 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-10-24 04:49:50 -0400 |
commit | 527f6570300980251e818e80865b437eefb4e5d3 (patch) | |
tree | 5db497e93853d6eb05fdbeb27b86669f1afde9e4 | |
parent | 66ddcc39420f3c6d2356f7618fbed3dd61177cee (diff) |
ath6kl: fix uninitialized variable in ath6kl_sdio_enable_scatter()
gcc 4.8 warns
/backup/lsrc/git/linux-lto-2.6/drivers/net/wireless/ath/ath6kl/sdio.c:
In function 'ath6kl_sdio_enable_scatter':
/backup/lsrc/git/linux-lto-2.6/drivers/net/wireless/ath/ath6kl/sdio.c:748:16:
warning: 'ret' may be used uninitialized in this function
[-Wmaybe-uninitialized]
if (virt_scat || ret) {
^
The variable can indeed be uninitialized when the previous if branch is
skipped. I just set it to zero for now. I'm not fully sure the fix is
correct, maybe the || should be an && ?
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/sdio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c index a72a4d02a4c8..d111980d44c0 100644 --- a/drivers/net/wireless/ath/ath6kl/sdio.c +++ b/drivers/net/wireless/ath/ath6kl/sdio.c | |||
@@ -709,7 +709,7 @@ static int ath6kl_sdio_enable_scatter(struct ath6kl *ar) | |||
709 | { | 709 | { |
710 | struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar); | 710 | struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar); |
711 | struct htc_target *target = ar->htc_target; | 711 | struct htc_target *target = ar->htc_target; |
712 | int ret; | 712 | int ret = 0; |
713 | bool virt_scat = false; | 713 | bool virt_scat = false; |
714 | 714 | ||
715 | if (ar_sdio->scatter_enabled) | 715 | if (ar_sdio->scatter_enabled) |