Skip to contentSkip to conversation

ALSA: usb: don't print error when allocating urb fails

PATCH New Wolfram Sang 2 participants 3 messages Aug 11, 2016 2 messages not in the archive

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

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

From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/[email protected]>

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):
ALSA: usb: caiaq: audio: don't print error when allocating urb fails

 sound/usb/caiaq/audio.c | 1 -
 1 file changed, 1 deletion(-)
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

A message that is not in the archive (sent off-list or not yet received): 1470948012-22897-1-git-send-email-wsa-dev-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org

#2 lore raw

PATCH 1/1 ALSA: usb: caiaq: audio: don't print error when allocating urb fails

kmalloc will print enough information in case of failure.

---
 sound/usb/caiaq/audio.c | 1 -
 1 file changed, 1 deletion(-)
sound/usb/caiaq/audio.c +0 -1
index 327f8642ca80e6..8f66ba730d69d9 100644
@@ -739,7 +739,6 @@ static struct urb **alloc_urbs(struct snd_usb_caiaqdev *cdev, int dir, int *ret)
 	for (i = 0; i < N_URBS; i++) {
 		urbs[i] = usb_alloc_urb(FRAMES_PER_URB, GFP_KERNEL);
 		if (!urbs[i]) {
-			dev_err(dev, "unable to usb_alloc_urb(), OOM!?\n");
 			*ret = -ENOMEM;
 			return urbs;
 		}
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

A message that is not in the archive (sent off-list or not yet received): 1470948012-22897-2-git-send-email-wsa-dev-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org

Applied
#4 lore raw

Re: [PATCH] ALSA: usb: caiaq: audio: don't print error when allocating urb fails

Quoted 4 lines · Wolfram Sang

kmalloc will print enough information in case of failure.

Applied, thanks.

Takashi

Quoted 20 lines
---
 sound/usb/caiaq/audio.c | 1 -
 1 file changed, 1 deletion(-)
sound/usb/caiaq/audio.c +0 -1
index 327f8642ca80e6..8f66ba730d69d9 100644
@@ -739,7 +739,6 @@ static struct urb **alloc_urbs(struct snd_usb_caiaqdev *cdev, int dir, int *ret)
 	for (i = 0; i < N_URBS; i++) {
 		urbs[i] = usb_alloc_urb(FRAMES_PER_URB, GFP_KERNEL);
 		if (!urbs[i]) {
-			dev_err(dev, "unable to usb_alloc_urb(), OOM!?\n");
 			*ret = -ENOMEM;
 			return urbs;
 		}
Signature · 1 line
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