1
0
Fork 0

ALSA: mixart: Delete an error message for a failed memory allocation in snd_mixart_create()

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>
zero-colors
Markus Elfring 2017-08-12 18:45:42 +02:00 committed by Takashi Iwai
parent c38774d830
commit a357f3d1ee
1 changed files with 1 additions and 3 deletions

View File

@ -1052,10 +1052,8 @@ static int snd_mixart_create(struct mixart_mgr *mgr, struct snd_card *card, int
};
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (! chip) {
dev_err(card->dev, "cannot allocate chip\n");
if (!chip)
return -ENOMEM;
}
chip->card = card;
chip->chip_idx = idx;