Skip to content

Commit d9b8fbf

Browse files
WillLestertiwai
authored andcommitted
ALSA: es1688: Add the missed snd_card_free()
snd_es968_pnp_detect() misses a snd_card_free() in a failed path. Add the missed function call to fix it. Fixes: a20971b ("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>
1 parent 27a7c67 commit d9b8fbf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

sound/isa/es1688/es1688.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,10 @@ static int snd_es968_pnp_detect(struct pnp_card_link *pcard,
267267
return error;
268268
}
269269
error = snd_es1688_probe(card, dev);
270-
if (error < 0)
270+
if (error < 0) {
271+
snd_card_free(card);
271272
return error;
273+
}
272274
pnp_set_card_drvdata(pcard, card);
273275
snd_es968_pnp_is_probed = 1;
274276
return 0;

0 commit comments

Comments
 (0)