Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Commit ca95679

Browse files
dinghaoliugregkh
authored andcommitted
ALSA: echoaudio: Fix potential Oops in snd_echo_resume()
[ Upstream commit 5a25de6df789cc805a9b8ba7ab5deef5067af47e ] 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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 2a42848 commit ca95679

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
@@ -2215,7 +2215,6 @@ static int snd_echo_resume(struct device *dev)
22152215
if (err < 0) {
22162216
kfree(commpage_bak);
22172217
dev_err(dev, "resume init_hw err=%d\n", err);
2218-
snd_echo_free(chip);
22192218
return err;
22202219
}
22212220

@@ -2242,7 +2241,6 @@ static int snd_echo_resume(struct device *dev)
22422241
if (request_irq(pci->irq, snd_echo_interrupt, IRQF_SHARED,
22432242
KBUILD_MODNAME, chip)) {
22442243
dev_err(chip->card->dev, "cannot grab irq\n");
2245-
snd_echo_free(chip);
22462244
return -EBUSY;
22472245
}
22482246
chip->irq = pci->irq;

0 commit comments

Comments
 (0)