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:08:09 +0000 (12:08 +0900)
commitd1471eb15b7b25c5da001d65e42c4d39ce334f6c
tree1d81b9ef4fc0be344b34195c6ea7df78cdffd1c9
parent77ee1271696b85cbeaf617e6630769ad28b728fd
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