USB: cdc-acm: fix runtime PM imbalance at shutdown
authorJohan Hovold <jhovold@gmail.com>
Mon, 26 May 2014 17:23:45 +0000 (19:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jun 2014 19:10:29 +0000 (15:10 -0400)
commit7be9d6cd4b57ebd5b344e4a006c0aa6e7a08aba3
treeae3b4a8e437859265f2458d1b3b54d25acab18e6
parent8fd20d5a377f5baa510a804a3b2c9b21d31bb445
USB: cdc-acm: fix runtime PM imbalance at shutdown

commit 5292afa657d0e790b7479ad8eef9450c1e040b3d upstream.

Make sure only to decrement the PM counters if they were actually
incremented.

Note that the USB PM counter, but not necessarily the driver core PM
counter, is reset when the interface is unbound.

Fixes: 11ea859d64b6 ("USB: additional power savings for cdc-acm devices
that support remote wakeup")

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-acm.c