Re: [PATCH] ath6kl: Fix ath6kl_bmi_read_hi32 macro

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

 



Frederic Danis <frederic.danis@xxxxxxxxxxxxxxx> writes:

> tmp may be used uninitialized if ath6kl_bmi_read() returns an error.
>
> Signed-off-by: Frederic Danis <frederic.danis@xxxxxxxxxxxxxxx>
> ---
>  drivers/net/wireless/ath/ath6kl/bmi.h |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath6kl/bmi.h b/drivers/net/wireless/ath/ath6kl/bmi.h
> index 18fdd69..397a52f 100644
> --- a/drivers/net/wireless/ath/ath6kl/bmi.h
> +++ b/drivers/net/wireless/ath/ath6kl/bmi.h
> @@ -242,7 +242,8 @@ struct ath6kl_bmi_target_info {
>  		(void) (check_type == val);				\
>  		addr = ath6kl_get_hi_item_addr(ar, HI_ITEM(item));	\
>  		ret = ath6kl_bmi_read(ar, addr, (u8 *) &tmp, 4);	\
> -		*val = le32_to_cpu(tmp);				\
> +		if (!ret)						\
> +			*val = le32_to_cpu(tmp);			\
>  		ret;							\
>  	})

I see new warnings with this patch:

drivers/net/wireless/ath/ath6kl/init.c: In function '__ath6kl_init_hw_start.part.5':
drivers/net/wireless/ath/ath6kl/init.c:1196:13: warning: 'board_ext_address' may be used uninitialized in this function [-Wuninitialized]
drivers/net/wireless/ath/ath6kl/init.c:1147:21: note: 'board_ext_address' was declared here
drivers/net/wireless/ath/ath6kl/init.c:1224:6: warning: 'board_address' may be used uninitialized in this function [-Wuninitialized]
drivers/net/wireless/ath/ath6kl/init.c:1147:6: note: 'board_address' was declared here

-- 
Kalle Valo

_______________________________________________
ath6kl mailing list
ath6kl@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/ath6kl




[Index of Archives]     [Linux Kernel]     [Linux Wireless]     [Linux Bluetooth]     [Linux WPAN]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]

  Powered by Linux