All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bluetooth: don't print error when allocating urb fails
@ 2016-08-11 21:00 Wolfram Sang
  2016-08-11 21:00 ` [PATCH] bluetooth: bcm203x: " Wolfram Sang
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2016-08-11 21:00 UTC (permalink / raw)
  To: linux-usb; +Cc: Wolfram Sang, linux-bluetooth

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(-)

-- 
2.8.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] bluetooth: bcm203x: don't print error when allocating urb fails
  2016-08-11 21:00 [PATCH] bluetooth: don't print error when allocating urb fails Wolfram Sang
@ 2016-08-11 21:00 ` Wolfram Sang
  2016-08-24 14:57   ` Marcel Holtmann
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2016-08-11 21:00 UTC (permalink / raw)
  To: linux-usb
  Cc: Wolfram Sang, Marcel Holtmann, Gustavo Padovan, Johan Hedberg,
	linux-bluetooth

kmalloc will print enough information in case of failure.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
 drivers/bluetooth/bcm203x.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c
index 5b0ef7bbe8ac87..5ce6d4176dc302 100644
--- a/drivers/bluetooth/bcm203x.c
+++ b/drivers/bluetooth/bcm203x.c
@@ -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");
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] bluetooth: bcm203x: don't print error when allocating urb fails
  2016-08-11 21:00 ` [PATCH] bluetooth: bcm203x: " Wolfram Sang
@ 2016-08-24 14:57   ` Marcel Holtmann
  0 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2016-08-24 14:57 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-usb, Gustavo F. Padovan, Johan Hedberg, linux-bluetooth

Hi Wolfram,

> kmalloc will print enough information in case of failure.
> 
> Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
> ---
> drivers/bluetooth/bcm203x.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bluetooth: bcm203x: don't print error when allocating urb fails
  2016-08-11 20:51 ` [PATCH] bluetooth: bcm203x: " Wolfram Sang
@ 2016-08-11 21:02   ` Wolfram Sang
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2016-08-11 21:02 UTC (permalink / raw)
  To: linux-usb
  Cc: Wolfram Sang, Marcel Holtmann, Gustavo Padovan, Johan Hedberg,
	linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

On Thu, Aug 11, 2016 at 10:51:34PM +0200, Wolfram Sang wrote:
> From: Wolfram Sang <wsa-dev@sang-engineering.com>
> 
> kmalloc will print enough information in case of failure.
> 
> Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>

Sorry for the noise. This one was sent from the wrong email address :(


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] bluetooth: bcm203x: don't print error when allocating urb fails
  2016-08-11 20:51 [PATCH] bluetooth: " Wolfram Sang
@ 2016-08-11 20:51 ` Wolfram Sang
  2016-08-11 21:02   ` Wolfram Sang
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2016-08-11 20:51 UTC (permalink / raw)
  To: linux-usb
  Cc: Wolfram Sang, Marcel Holtmann, Gustavo Padovan, Johan Hedberg,
	linux-bluetooth

From: Wolfram Sang <wsa-dev@sang-engineering.com>

kmalloc will print enough information in case of failure.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
 drivers/bluetooth/bcm203x.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c
index 5b0ef7bbe8ac87..5ce6d4176dc302 100644
--- a/drivers/bluetooth/bcm203x.c
+++ b/drivers/bluetooth/bcm203x.c
@@ -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");
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-24 14:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-11 21:00 [PATCH] bluetooth: don't print error when allocating urb fails Wolfram Sang
2016-08-11 21:00 ` [PATCH] bluetooth: bcm203x: " Wolfram Sang
2016-08-24 14:57   ` Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2016-08-11 20:51 [PATCH] bluetooth: " Wolfram Sang
2016-08-11 20:51 ` [PATCH] bluetooth: bcm203x: " Wolfram Sang
2016-08-11 21:02   ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.