提交 2b223a91 编写于 作者: M Markus Elfring 提交者: 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: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册