ALSA: x86: Fix potential crash at error path
authorTakashi Iwai <tiwai@suse.de>
Wed, 28 Feb 2018 07:46:00 +0000 (08:46 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 28 Feb 2018 07:46:00 +0000 (08:46 +0100)
commitc77a6edb6d4d35204673cad7389c317bfb17492e
tree81f571d7a1c951c58014d3981cc8250c911a256c
parent350144069abf351c743d766b2fba9cb9b7cd32a1
ALSA: x86: Fix potential crash at error path

When LPE audio driver gets some error at probing, it may lead to a
crash because of canceling the pending work in hdmi_lpe_audio_free(),
since some of ports might be still not initialized.

For assuring the proper free of each port, initialize all ports at the
beginning of the probe.

Fixes: b4eb0d522fcb ("ALSA: x86: Split snd_intelhad into card and PCM specific structures")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/x86/intel_hdmi_audio.c