diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2020-06-03 17:24:59 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-22 09:05:02 +0200 |
commit | 23d0282aec465100238d20bceeaa01d792ec6583 (patch) | |
tree | 2295ede94830120234823f83da9f1c7b7d6867ba | |
parent | 7ba9be0ba0ce951deeaa057bfcf01f2b21a5b89a (diff) | |
download | linux-stable-23d0282aec465100238d20bceeaa01d792ec6583.tar.gz linux-stable-23d0282aec465100238d20bceeaa01d792ec6583.tar.bz2 linux-stable-23d0282aec465100238d20bceeaa01d792ec6583.zip |
ALSA: es1688: Add the missed snd_card_free()
commit d9b8fbf15d05350b36081eddafcf7b15aa1add50 upstream.
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 <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>
-rw-r--r-- | sound/isa/es1688/es1688.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c index 3dfe7e592c25..5a69314413b6 100644 --- a/sound/isa/es1688/es1688.c +++ b/sound/isa/es1688/es1688.c @@ -282,8 +282,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; |