Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: pcsp: Fix the order of input device unregistration

The current code may access to the already freed object. The input
device must be accessed and unregistered before freeing the top level
sound object.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+1 -1
+1 -1
sound/drivers/pcsp/pcsp.c
··· 188 188 static int pcsp_remove(struct platform_device *dev) 189 189 { 190 190 struct snd_pcsp *chip = platform_get_drvdata(dev); 191 - alsa_card_pcsp_exit(chip); 192 191 pcspkr_input_remove(chip->input_dev); 192 + alsa_card_pcsp_exit(chip); 193 193 return 0; 194 194 } 195 195