Skip to content

Commit 5a25de6

Browse files
dinghaoliutiwai
authored andcommitted
ALSA: echoaudio: Fix potential Oops in snd_echo_resume()
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]>
1 parent d96f27c commit 5a25de6

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

sound/pci/echoaudio/echoaudio.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2212,7 +2212,6 @@ static int snd_echo_resume(struct device *dev)
22122212
if (err < 0) {
22132213
kfree(commpage_bak);
22142214
dev_err(dev, "resume init_hw err=%d\n", err);
2215-
snd_echo_free(chip);
22162215
return err;
22172216
}
22182217

@@ -2239,7 +2238,6 @@ static int snd_echo_resume(struct device *dev)
22392238
if (request_irq(pci->irq, snd_echo_interrupt, IRQF_SHARED,
22402239
KBUILD_MODNAME, chip)) {
22412240
dev_err(chip->card->dev, "cannot grab irq\n");
2242-
snd_echo_free(chip);
22432241
return -EBUSY;
22442242
}
22452243
chip->irq = pci->irq;

0 commit comments

Comments
 (0)