summaryrefslogtreecommitdiffstats
path: root/sound/usb/stream.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-11 18:38:25 +0200
committerTakashi Iwai <tiwai@suse.de>2017-08-12 23:20:55 +0200
commit9ecb2406de33470b70b48a2e107730bd37547e31 (patch)
tree0423f6f72a8d03112388a700184e2b6910348da3 /sound/usb/stream.c
parentALSA: usx2y: Delete an error message for a failed memory allocation in two fu... (diff)
downloadlinux-9ecb2406de33470b70b48a2e107730bd37547e31.tar.xz
linux-9ecb2406de33470b70b48a2e107730bd37547e31.zip
ALSA: usb: Delete an error message for a failed memory allocation in two functions
Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/stream.c')
-rw-r--r--sound/usb/stream.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index 8e9548bc1f1a..d1776e5517ff 100644
--- a/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -658,10 +658,8 @@ int snd_usb_parse_audio_interface(struct snd_usb_audio *chip, int iface_no)
continue;
fp = kzalloc(sizeof(*fp), GFP_KERNEL);
- if (! fp) {
- dev_err(&dev->dev, "cannot malloc\n");
+ if (!fp)
return -ENOMEM;
- }
fp->iface = iface_no;
fp->altsetting = altno;