Skip to content

Commit

Permalink
ALSA: opti93x - Fix NULL dereference
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed Jul 18, 2008
1 parent 2522d73 commit 82af6bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/isa/opti9xx/opti92x-ad1848.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 82af6bc

Please sign in to comment.