Skip to contentSkip to conversation

staging: don't print error when allocating urb fails

PATCH New Wolfram Sang 1 participant 3 messages Aug 11, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover staging: 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 (6):
staging: comedi: drivers: usbduxfast: don't print error when
allocating urb fails
staging: media: lirc: lirc_imon: don't print error when allocating urb
fails
staging: media: lirc: lirc_sasem: don't print error when allocating
urb fails
staging: most: hdm-usb: hdm_usb: don't print error when allocating urb
fails
staging: rtl8192u: r8192U_core: don't print error when allocating urb
fails
staging: vt6656: main_usb: don't print error when allocating urb fails

 drivers/staging/comedi/drivers/usbduxfast.c |  4 +---
 drivers/staging/media/lirc/lirc_imon.c      |  9 ++-------
 drivers/staging/media/lirc/lirc_sasem.c     |  5 -----
 drivers/staging/most/hdm-usb/hdm_usb.c      |  4 +---
 drivers/staging/rtl8192u/r8192U_core.c      |  5 +----
 drivers/staging/vt6656/main_usb.c           | 12 +++---------
 6 files changed, 8 insertions(+), 31 deletions(-)
Signature · 1 line
2.8.1
#1 lore raw

PATCH 2/6 staging: media: lirc: lirc_imon: don't print error when allocating urb fails

kmalloc will print enough information in case of failure.

---
 drivers/staging/media/lirc/lirc_imon.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/staging/media/lirc/lirc_imon.c +2 -7
index ff1926ca1f96f5..a183e68ec32089 100644
@@ -797,16 +797,11 @@ static int imon_probe(struct usb_interface *interface,
 		goto free_rbuf;
 	}
 	rx_urb = usb_alloc_urb(0, GFP_KERNEL);
-	if (!rx_urb) {
-		dev_err(dev, "%s: usb_alloc_urb failed for IR urb\n", __func__);
+	if (!rx_urb)
 		goto free_lirc_buf;
-	}
 	tx_urb = usb_alloc_urb(0, GFP_KERNEL);
-	if (!tx_urb) {
-		dev_err(dev, "%s: usb_alloc_urb failed for display urb\n",
-		    __func__);
+	if (!tx_urb)
 		goto free_rx_urb;
-	}
 
 	mutex_init(&context->ctx_lock);
 	context->vfd_proto_6p = vfd_proto_6p;
Signature · 1 line
2.8.1
#2 lore raw

PATCH 3/6 staging: media: lirc: lirc_sasem: don't print error when allocating urb fails

In reply to Wolfram Sang

kmalloc will print enough information in case of failure.

---
 drivers/staging/media/lirc/lirc_sasem.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/staging/media/lirc/lirc_sasem.c +0 -5
index 2218d0042030ed..b080fde6d740c9 100644
@@ -758,17 +758,12 @@ static int sasem_probe(struct usb_interface *interface,
 	}
 	rx_urb = usb_alloc_urb(0, GFP_KERNEL);
 	if (!rx_urb) {
-		dev_err(&interface->dev,
-			"%s: usb_alloc_urb failed for IR urb\n", __func__);
 		alloc_status = 5;
 		goto alloc_status_switch;
 	}
 	if (vfd_ep_found) {
 		tx_urb = usb_alloc_urb(0, GFP_KERNEL);
 		if (!tx_urb) {
-			dev_err(&interface->dev,
-				"%s: usb_alloc_urb failed for VFD urb",
-				__func__);
 			alloc_status = 6;
 			goto alloc_status_switch;
 		}
Signature · 1 line
2.8.1