From 9ecb2406de33470b70b48a2e107730bd37547e31 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Fri, 11 Aug 2017 18:38:25 +0200 Subject: 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 Signed-off-by: Takashi Iwai --- sound/usb/stream.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sound/usb/stream.c') diff --git a/sound/usb/stream.c b/sound/usb/stream.c index 8e9548bc..d1776e5 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; -- cgit v1.1