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>
This commit is contained in:

committed by
Takashi Iwai

parent
6fd9ff7b01
commit
9ecb2406de
@@ -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;
|
||||
|
Reference in New Issue
Block a user