ALSA: hda - Fix unbalanced runtime PM refcount after S3/S4
authorTakashi Iwai <tiwai@suse.de>
Wed, 23 Oct 2013 23:20:24 +0000 (01:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Nov 2013 03:05:32 +0000 (12:05 +0900)
commitc9e32ffdbe042276914daac9cdc737b8896eace6
treeb2ec70f08c1cc5c51ab4cc586f60ad2ae4842b27
parent8fde18bd74c8f30094bc47edf2c9ed19478661de
ALSA: hda - Fix unbalanced runtime PM refcount after S3/S4

commit e6bbe666673ab044a3d39ddb74e4d9a401cf1d6f upstream.

When a machine goes to S3/S4 after power-save is enabled, the runtime
PM refcount might be incorrectly decreased because the power-down
triggered soon after resume assumes that the controller was already
powered up, and issues the pm_notify down.

This patch fixes the incorrect pm_notify call simply by checking the
current value properly.

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