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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Markus Elfring 2017-08-12 19:54:20 +02:00 committed by Takashi Iwai
parent f197acd27e
commit 2b223a9119
1 changed files with 1 additions and 3 deletions

View File

@ -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;