aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuhong Yuan <[email protected]>2020-06-03 17:24:59 +0800
committerTakashi Iwai <[email protected]>2020-06-03 11:40:55 +0200
commitd9b8fbf15d05350b36081eddafcf7b15aa1add50 (patch)
treeb3dcc1e872136bd3fd2a0a35d10d233888d7b62c
parent27a7c67012cfa6d79f87fbb51afa13c6c0e24e34 (diff)
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: a20971b201ac ("ALSA: Merge es1688 and es968 drivers") Signed-off-by: Chuhong Yuan <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
-rw-r--r--sound/isa/es1688/es1688.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
index ff3a05ad99c0..64610571a5e1 100644
--- a/sound/isa/es1688/es1688.c
+++ b/sound/isa/es1688/es1688.c
@@ -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;