ALSA: hda - Fix registration race of VGA switcheroo
commitb393c7d4d577fa9f55fa7ba84d51bd30352b80da
authorTakashi Iwai <tiwai@suse.de>
Fri, 12 Oct 2012 15:28:18 +0000 (12 17:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Oct 2012 16:32:43 +0000 (21 09:32 -0700)
treefae8bc09007a22744b29f4c76a12f313d563bb12
parent758881acfecdc1e872506a6dc156c4dbb99b8f2a
ALSA: hda - Fix registration race of VGA switcheroo

commit 128960a9ad67e2d119738f5211956e0304517551 upstream.

Delay the registration of VGA switcheroo client to the end of the
probing.  Otherwise a too quick switching may result in Oops during
probing.

Also add the check of the return value from snd_hda_lock_devices().

Reported-and-tested-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_intel.c