summaryrefslogtreecommitdiffstats
path: root/sound/usb/quirks.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/quirks.c
parent6fd9ff7b019f5629e0f1f3a10bd4c03adfd7ec4e (diff)
downloadop-kernel-dev-9ecb2406de33470b70b48a2e107730bd37547e31.zip
op-kernel-dev-9ecb2406de33470b70b48a2e107730bd37547e31.tar.gz
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/quirks.c')
-rw-r--r--sound/usb/quirks.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index d7b0b0a..9db40d5 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -146,10 +146,9 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip,
unsigned *rate_table = NULL;
fp = kmemdup(quirk->data, sizeof(*fp), GFP_KERNEL);
- if (!fp) {
- usb_audio_err(chip, "cannot memdup\n");
+ if (!fp)
return -ENOMEM;
- }
+
INIT_LIST_HEAD(&fp->list);
if (fp->nr_rates > MAX_NR_RATES) {
kfree(fp);
OpenPOWER on IntegriCloud