351-0030-net-wireless-broadcom-brcm80211-brcmfmac-usb-don-t-p.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. From 938f89e50a41c2d56710805fb019ad7618cef84b Mon Sep 17 00:00:00 2001
  2. From: Wolfram Sang <wsa-dev@sang-engineering.com>
  3. Date: Thu, 11 Aug 2016 23:05:31 +0200
  4. Subject: [PATCH] net: wireless: broadcom: brcm80211: brcmfmac: usb: don't
  5. print error when allocating urb fails
  6. kmalloc will print enough information in case of failure.
  7. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
  8. Signed-off-by: David S. Miller <davem@davemloft.net>
  9. ---
  10. drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 8 ++------
  11. 1 file changed, 2 insertions(+), 6 deletions(-)
  12. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
  13. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
  14. @@ -1099,15 +1099,11 @@ struct brcmf_usbdev *brcmf_usb_attach(st
  15. devinfo->tx_freecount = ntxq;
  16. devinfo->ctl_urb = usb_alloc_urb(0, GFP_ATOMIC);
  17. - if (!devinfo->ctl_urb) {
  18. - brcmf_err("usb_alloc_urb (ctl) failed\n");
  19. + if (!devinfo->ctl_urb)
  20. goto error;
  21. - }
  22. devinfo->bulk_urb = usb_alloc_urb(0, GFP_ATOMIC);
  23. - if (!devinfo->bulk_urb) {
  24. - brcmf_err("usb_alloc_urb (bulk) failed\n");
  25. + if (!devinfo->bulk_urb)
  26. goto error;
  27. - }
  28. return &devinfo->bus_pub;