Skip to contentSkip to conversation

bluetooth: don't print error when allocating urb fails

PATCH New Wolfram Sang 2 participants 3 messages Aug 11, 2016 – Aug 24, 2016 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bluetooth: don't print error when allocating urb fails

This per-subsystem series is part of a tree wide cleanup. usb_alloc_urb() uses kmalloc which already prints enough information on failure. So, let's simply remove those "allocation failed" messages from drivers like we did already for other -ENOMEM cases. gkh acked this approach when we talked about it at LCJ in Tokyo a few weeks ago.

Wolfram Sang (1):
bluetooth: bcm203x: don't print error when allocating urb fails

 drivers/bluetooth/bcm203x.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Signature · 1 line
2.8.1
#1 lore raw

PATCH 1/1 bluetooth: bcm203x: don't print error when allocating urb fails

kmalloc will print enough information in case of failure.

---
 drivers/bluetooth/bcm203x.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/bluetooth/bcm203x.c +1 -3
index 5b0ef7bbe8ac87..5ce6d4176dc302 100644
@@ -185,10 +185,8 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
 	data->state = BCM203X_LOAD_MINIDRV;
 
 	data->urb = usb_alloc_urb(0, GFP_KERNEL);
-	if (!data->urb) {
-		BT_ERR("Can't allocate URB");
+	if (!data->urb)
 		return -ENOMEM;
-	}
 
 	if (request_firmware(&firmware, "BCM2033-MD.hex", &udev->dev) < 0) {
 		BT_ERR("Mini driver request failed");
Signature · 1 line
2.8.1
maintainer
#2 lore raw

Re: [PATCH] bluetooth: bcm203x: don't print error when allocating urb fails

Hi Wolfram,

Quoted 6 lines

kmalloc will print enough information in case of failure.

---
drivers/bluetooth/bcm203x.c | 4 +---

1 file changed, 1 insertion(+), 3 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel