1
0
Fork 0

ALSA: es1688: Add the missed snd_card_free()

commit d9b8fbf15d upstream.

snd_es968_pnp_detect() misses a snd_card_free() in a failed path.
Add the missed function call to fix it.

Fixes: a20971b201 ("ALSA: Merge es1688 and es968 drivers")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200603092459.1424093-1-hslester96@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5.4-rM2-2.2.x-imx-squashed
Chuhong Yuan 2020-06-03 17:24:59 +08:00 committed by Greg Kroah-Hartman
parent f7d57ba8d7
commit 110d04acda
1 changed files with 3 additions and 1 deletions

View File

@ -267,8 +267,10 @@ static int snd_es968_pnp_detect(struct pnp_card_link *pcard,
return error;
}
error = snd_es1688_probe(card, dev);
if (error < 0)
if (error < 0) {
snd_card_free(card);
return error;
}
pnp_set_card_drvdata(pcard, card);
snd_es968_pnp_is_probed = 1;
return 0;