Commit 2b223a91 authored by Markus Elfring's avatar Markus Elfring Committed by Takashi Iwai

ALSA: opl3: Delete an error message for a failed memory allocation in snd_opl3_new()

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f197acd2
......@@ -355,10 +355,8 @@ int snd_opl3_new(struct snd_card *card,
*ropl3 = NULL;
opl3 = kzalloc(sizeof(*opl3), GFP_KERNEL);
if (opl3 == NULL) {
snd_printk(KERN_ERR "opl3: cannot allocate\n");
if (!opl3)
return -ENOMEM;
}
opl3->card = card;
opl3->hardware = hardware;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment