提交 82af6bc0 编写于 作者: T Takashi Iwai

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: NTakashi Iwai <tiwai@suse.de>
Tested-by: NRene Herman <rene.herman@gmail.com>
Acked-by: NRene Herman <rene.herman@gmail.com>
Tested-by: NIngo Molnar <mingo@elte.hu>
Acked-by: NIngo Molnar <mingo@elte.hu>
上级 2522d735
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册