Commit 8d5c3030 authored by Ville Syrjälä's avatar Ville Syrjälä

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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170427160231.13337-3-ville.syrjala@linux.intel.comReviewed-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 183c0035
...@@ -1665,6 +1665,11 @@ static int __maybe_unused hdmi_lpe_audio_resume(struct device *dev) ...@@ -1665,6 +1665,11 @@ static int __maybe_unused hdmi_lpe_audio_resume(struct device *dev)
static void hdmi_lpe_audio_free(struct snd_card *card) static void hdmi_lpe_audio_free(struct snd_card *card)
{ {
struct snd_intelhad *ctx = card->private_data; struct snd_intelhad *ctx = card->private_data;
struct intel_hdmi_lpe_audio_pdata *pdata = ctx->dev->platform_data;
spin_lock_irq(&pdata->lpe_audio_slock);
pdata->notify_audio_lpe = NULL;
spin_unlock_irq(&pdata->lpe_audio_slock);
cancel_work_sync(&ctx->hdmi_audio_wq); cancel_work_sync(&ctx->hdmi_audio_wq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment