Skip to content

Commit 306df54

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 8bc48c3 commit 306df54

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
@@ -2198,7 +2198,6 @@ static int snd_echo_resume(struct device *dev)
21982198
if (err < 0) {
21992199
kfree(commpage_bak);
22002200
dev_err(dev, "resume init_hw err=%d\n", err);
2201-
snd_echo_free(chip);
22022201
return err;
22032202
}
22042203

@@ -2225,7 +2224,6 @@ static int snd_echo_resume(struct device *dev)
22252224
if (request_irq(pci->irq, snd_echo_interrupt, IRQF_SHARED,
22262225
KBUILD_MODNAME, chip)) {
22272226
dev_err(chip->card->dev, "cannot grab irq\n");
2228-
snd_echo_free(chip);
22292227
return -EBUSY;
22302228
}
22312229
chip->irq = pci->irq;

0 commit comments

Comments
 (0)