diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-04-27 12:02:21 -0400 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-05-03 09:19:07 -0400 |
commit | 8d5c30308d7c5a17db96fa5452c0232f633377c2 (patch) | |
tree | c4abcbd258fe586acc4ff7fd8a1566afbd29af36 /sound/x86 | |
parent | 183c00350ccda86781f6695840e6c5f5b22efbd1 (diff) |
ALSA: x86: Clear the pdata.notify_lpe_audio pointer before teardown
Clear the notify function pointer in the platform data before we tear
down the driver. Otherwise i915 would end up calling a stale function
pointer and possibly explode.
Cc: stable@vger.kernel.org
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170427160231.13337-3-ville.syrjala@linux.intel.com
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86')
-rw-r--r-- | sound/x86/intel_hdmi_audio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c index bfac6f21ae5e..5b89662493c9 100644 --- a/sound/x86/intel_hdmi_audio.c +++ b/sound/x86/intel_hdmi_audio.c | |||
@@ -1665,6 +1665,11 @@ static int __maybe_unused hdmi_lpe_audio_resume(struct device *dev) | |||
1665 | static void hdmi_lpe_audio_free(struct snd_card *card) | 1665 | static void hdmi_lpe_audio_free(struct snd_card *card) |
1666 | { | 1666 | { |
1667 | struct snd_intelhad *ctx = card->private_data; | 1667 | struct snd_intelhad *ctx = card->private_data; |
1668 | struct intel_hdmi_lpe_audio_pdata *pdata = ctx->dev->platform_data; | ||
1669 | |||
1670 | spin_lock_irq(&pdata->lpe_audio_slock); | ||
1671 | pdata->notify_audio_lpe = NULL; | ||
1672 | spin_unlock_irq(&pdata->lpe_audio_slock); | ||
1668 | 1673 | ||
1669 | cancel_work_sync(&ctx->hdmi_audio_wq); | 1674 | cancel_work_sync(&ctx->hdmi_audio_wq); |
1670 | 1675 | ||