Search Linux Wireless

Re: [PATCH] brcm80211: fmac: Add error check for brcmf_usb_dlneeded()

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

 



…
> Add error handling for brcmf_usb_dl_cmd() to return the function if the
> 'id.chiprev' is uninitialized.

* Please reconsider the offered conclusion once more.

* I propose to replace the word “for” by “in” (before function names)
  in some summary phrases.


…
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
…
> @@ -798,7 +799,11 @@ brcmf_usb_dlneeded(struct brcmf_usbdev_info *devinfo)
>
>  	/* Check if firmware downloaded already by querying runtime ID */
>  	id.chip = cpu_to_le32(0xDEAD);
> -	brcmf_usb_dl_cmd(devinfo, DL_GETVER, &id, sizeof(id));
> +	err = brcmf_usb_dl_cmd(devinfo, DL_GETVER, &id, sizeof(id));
> +	if (err) {
> +		brcmf_err("DL_GETID Failed\n");
> +		return false;
> +	}
…

Would an error hint like “DL_GETVER failed\n” be more appropriate here?

Regards,
Markus





[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