…
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