dect
/
linux-2.6
Archived
13
0
Fork 0

ALSA: opti93x - Fix NULL dereference

Probing non-existing device causes Oops with snd-opti93x driver
due to NULL access in the destructor of the error path.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Rene Herman <rene.herman@gmail.com>
Acked-by: Rene Herman <rene.herman@gmail.com>
Tested-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Takashi Iwai 2008-07-17 23:37:20 +02:00
parent 2522d73593
commit 82af6bc098
1 changed files with 1 additions and 1 deletions

View File

@ -688,7 +688,7 @@ static void snd_card_opti9xx_free(struct snd_card *card)
if (chip) {
#ifdef OPTi93X
struct snd_cs4231 *codec = chip->codec;
if (codec->irq > 0) {
if (codec && codec->irq > 0) {
disable_irq(codec->irq);
free_irq(codec->irq, codec);
}