diff mbox

brcmfmac: check result of USB firmware request

Message ID 1431000783-17411-1-git-send-email-zajec5@gmail.com (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

Rafał Miłecki May 7, 2015, 12:13 p.m. UTC
This prevents silence failures with driver waiting (infinitely) for a
callback.

Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
I don't really have any opinion if this should go for next or as a fix.
---
 drivers/net/wireless/brcm80211/brcmfmac/usb.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Arend van Spriel May 8, 2015, 9:30 a.m. UTC | #1
On 05/07/15 14:13, Rafa? Mi?ecki wrote:
> This prevents silence failures with driver waiting (infinitely) for a
> callback.

Looks like proper thing to do :-p

Acked-by: Arend van Spriel <arend@broadcom.com>
> Signed-off-by: Rafa? Mi?ecki<zajec5@gmail.com>
> ---
> I don't really have any opinion if this should go for next or as a fix.
> ---
>   drivers/net/wireless/brcm80211/brcmfmac/usb.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
> index 5df6aa7..daba86d 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
> @@ -1270,8 +1270,13 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo)
>   	bus->chiprev = bus_pub->chiprev;
>
>   	/* request firmware here */
> -	brcmf_fw_get_firmwares(dev, 0, brcmf_usb_get_fwname(devinfo), NULL,
> -			       brcmf_usb_probe_phase2);
> +	ret = brcmf_fw_get_firmwares(dev, 0, brcmf_usb_get_fwname(devinfo),
> +				     NULL, brcmf_usb_probe_phase2);
> +	if (ret) {
> +		brcmf_err("firmware request failed: %d\n", ret);
> +		goto fail;
> +	}
> +
>   	return 0;
>
>   fail:

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kalle Valo May 9, 2015, 1:59 p.m. UTC | #2
> This prevents silence failures with driver waiting (infinitely) for a
> callback.
> 
> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
> Acked-by: Arend van Spriel <arend@broadcom.com>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kalle Valo May 9, 2015, 2:02 p.m. UTC | #3
Kalle Valo <kvalo@codeaurora.org> writes:

>> This prevents silence failures with driver waiting (infinitely) for a
>> callback.
>> 
>> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
>> Acked-by: Arend van Spriel <arend@broadcom.com>
>
> Thanks, applied to wireless-drivers-next.git.

But before I pushed I manually fixed the UTF-8 problem caused by the
patchwork bug.
diff mbox

Patch

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
index 5df6aa7..daba86d 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
@@ -1270,8 +1270,13 @@  static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo)
 	bus->chiprev = bus_pub->chiprev;
 
 	/* request firmware here */
-	brcmf_fw_get_firmwares(dev, 0, brcmf_usb_get_fwname(devinfo), NULL,
-			       brcmf_usb_probe_phase2);
+	ret = brcmf_fw_get_firmwares(dev, 0, brcmf_usb_get_fwname(devinfo),
+				     NULL, brcmf_usb_probe_phase2);
+	if (ret) {
+		brcmf_err("firmware request failed: %d\n", ret);
+		goto fail;
+	}
+
 	return 0;
 
 fail: