Skip to content

Commit

Permalink
ALSA: x86: Clear the pdata.notify_lpe_audio pointer before teardown
Browse files Browse the repository at this point in the history
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: [email protected]
Cc: Takashi Iwai <[email protected]>
Cc: Pierre-Louis Bossart <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Takashi Iwai <[email protected]>
  • Loading branch information
vsyrjala committed May 3, 2017
1 parent 183c003 commit 8d5c303
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sound/x86/intel_hdmi_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
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);

Expand Down

0 comments on commit 8d5c303

Please sign in to comment.