Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d99f312 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela
Browse files

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



codec->patch_ops.init can be NULL.  Check before calling it.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 918f3a0e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1677,6 +1677,7 @@ static void hda_call_codec_resume(struct hda_codec *codec)
	if (codec->patch_ops.resume)
		codec->patch_ops.resume(codec);
	else {
		if (codec->patch_ops.init)
			codec->patch_ops.init(codec);
		snd_hda_codec_resume_amp(codec);
		snd_hda_codec_resume_cache(codec);