diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-08-14 15:15:52 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 15:58:55 +0200 |
commit | 9d99f312629802f4c45306ee07618ee4978b4adc (patch) | |
tree | d3fdd0446e1b581e570336b5e12dd08f0b6b7d09 /sound | |
parent | [ALSA] pcm: add snd_pcm_rate_to_rate_bit() helper (diff) | |
download | linux-9d99f312629802f4c45306ee07618ee4978b4adc.tar.xz linux-9d99f312629802f4c45306ee07618ee4978b4adc.zip |
[ALSA] hda-intel - Fix NULL dereference in resume
codec->patch_ops.init can be NULL. Check before calling it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index efd56a3396bd..fc1ddf408b9b 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -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); } |