]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ALSA: hda - Fix Oops at codec reset/reconfig
authorTakashi Iwai <tiwai@suse.de>
Mon, 10 Sep 2012 07:39:31 +0000 (09:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:39:00 +0000 (10:39 -0700)
commit31b03dea1f35abfc97d0a005b6652344d2a856c5
treee98b31c90978663dc1d49ce430e438b14562016a
parentea026e7f8bde9b0906137b06a70b22d706d3c0c5
ALSA: hda - Fix Oops at codec reset/reconfig

commit 07dc59f0988cb54fd87bd373b3b27eb2401dd811 upstream.

snd_hda_codec_reset() calls restore_pincfgs() where the codec is
powered up again, which eventually tries to resume and initialize via
the callbacks of the codec.  However, it's the place just after codec
free callback, thus no codec callbacks should be called after that.
On a codec like CS4206, it results in Oops due to the access in init
callback.

This patch fixes the issue by clearing the codec callbacks properly
after freeing codec.

Reported-by: Daniel J Blueman <daniel@quora.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/hda_codec.c