Skip to content

Commit 6719a2c

Browse files
dinghaoliugregkh
authored andcommitted
ALSA: echoaudio: Fix potential Oops in snd_echo_resume()
[ Upstream commit 5a25de6 ] Freeing chip on error may lead to an Oops at the next time the system goes to resume. Fix this by removing all snd_echo_free() calls on error. Fixes: 47b5d02 ("ALSA: Echoaudio - Add suspend support #2") Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Link: https://lore.kernel.org/r/20200813074632.17022-1-dinghao.liu@zju.edu.cn Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4aadfa1 commit 6719a2c

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

sound/pci/echoaudio/echoaudio.c

-2
Original file line numberDiff line numberDiff line change
@@ -2158,7 +2158,6 @@ static int snd_echo_resume(struct device *dev)
21582158
if (err < 0) {
21592159
kfree(commpage_bak);
21602160
dev_err(dev, "resume init_hw err=%d\n", err);
2161-
snd_echo_free(chip);
21622161
return err;
21632162
}
21642163

@@ -2185,7 +2184,6 @@ static int snd_echo_resume(struct device *dev)
21852184
if (request_irq(pci->irq, snd_echo_interrupt, IRQF_SHARED,
21862185
KBUILD_MODNAME, chip)) {
21872186
dev_err(chip->card->dev, "cannot grab irq\n");
2188-
snd_echo_free(chip);
21892187
return -EBUSY;
21902188
}
21912189
chip->irq = pci->irq;

0 commit comments

Comments
 (0)