提交 9d99f312 编写于 作者: T Takashi Iwai 提交者: Jaroslav Kysela

[ALSA] hda-intel - Fix NULL dereference in resume

codec->patch_ops.init can be NULL.  Check before calling it.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@suse.cz>
上级 918f3a0e
......@@ -1677,7 +1677,8 @@ static void hda_call_codec_resume(struct hda_codec *codec)
if (codec->patch_ops.resume)
codec->patch_ops.resume(codec);
else {
codec->patch_ops.init(codec);
if (codec->patch_ops.init)
codec->patch_ops.init(codec);
snd_hda_codec_resume_amp(codec);
snd_hda_codec_resume_cache(codec);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册