Search Linux Wireless

Re: [PATCH] net: ath: fix missing checks for bmi reads and writes

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

 



Kangjie Lu <kjlu@xxxxxxx> writes:

> ath10k_bmi_write32 and ath10k_bmi_read32 can fail. The fix
> checks their statuses to avoid potential undefined behaviors.
>
> Signed-off-by: Kangjie Lu <kjlu@xxxxxxx>

[...]

> @@ -2500,8 +2515,15 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
>  		if (status)
>  			goto err;
>  
> -		if (ar->hif.bus == ATH10K_BUS_SDIO)
> -			ath10k_init_sdio(ar);
> +		if (ar->hif.bus == ATH10K_BUS_SDIO) {
> +			status = ath10k_init_sdio(ar);
> +			if (status) {
> +				ath10k_err(ar,
> +					   "could not init HTC (%d)\n",
> +					   status);

I'll fix the warning message as well, we are not initialisating HTC
here.

-- 
Kalle Valo



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

  Powered by Linux