Skip to contentSkip to conversation

mmc: don't print error when allocating urb fails

PATCH New Wolfram Sang 2 participants 3 messages Aug 11, 2016 – Aug 22, 2016 1 message not in the archive MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: 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):
mmc: host: vub300: don't print error when allocating urb fails

 drivers/mmc/host/vub300.c | 2 --
 1 file changed, 2 deletions(-)
Signature · 6 lines
2.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

PATCH 1/1 mmc: host: vub300: don't print error when allocating urb fails

In reply to a message not in the archive

kmalloc will print enough information in case of failure.

---
 drivers/mmc/host/vub300.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mmc/host/vub300.c +0 -2
index 1e819f98b94f52..bb3e0d1dd35501 100644
@@ -2116,13 +2116,11 @@ static int vub300_probe(struct usb_interface *interface,
 	command_out_urb = usb_alloc_urb(0, GFP_KERNEL);
 	if (!command_out_urb) {
 		retval = -ENOMEM;
-		dev_err(&udev->dev, "not enough memory for command_out_urb\n");
 		goto error0;
 	}
 	command_res_urb = usb_alloc_urb(0, GFP_KERNEL);
 	if (!command_res_urb) {
 		retval = -ENOMEM;
-		dev_err(&udev->dev, "not enough memory for command_res_urb\n");
 		goto error1;
 	}
 	/* this also allocates memory for our VUB300 mmc host device */
Signature · 6 lines
2.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Applied
#3 lore raw

Re: [PATCH] mmc: host: vub300: don't print error when allocating urb fails

Quoted 3 lines · Wolfram Sang

kmalloc will print enough information in case of failure.

Thanks, applied for next!

Kind regards
Uffe

Quoted 25 lines
---
 drivers/mmc/host/vub300.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mmc/host/vub300.c +0 -3
index 1e819f98b94f52..bb3e0d1dd35501 100644
@@ -2116,13 +2116,11 @@ static int vub300_probe(struct usb_interface *interface,
        command_out_urb = usb_alloc_urb(0, GFP_KERNEL);
        if (!command_out_urb) {
                retval = -ENOMEM;
-               dev_err(&udev->dev, "not enough memory for command_out_urb\n");
                goto error0;
        }
        command_res_urb = usb_alloc_urb(0, GFP_KERNEL);
        if (!command_res_urb) {
                retval = -ENOMEM;
-               dev_err(&udev->dev, "not enough memory for command_res_urb\n");
                goto error1;
        }
        /* this also allocates memory for our VUB300 mmc host device */
--

2.8.1