Search Linux Wireless

Re: [PATCH] Fix uninitialized variable in ath6kl ath6kl_sdio_enable_scatter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/03/2012 11:15 PM, Andi Kleen wrote:
> 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 && ? 

>From a quick look || should be correct, but of course I might be missing
something. I think your patch is correct way to fix this.

Thanks, applied to ath6kl.git. I just added "ath6kl:" prefix to the title.

Kalle
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux