diff options
author | Bjørn Mork <bjorn@mork.no> | 2013-11-29 20:17:45 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-09 13:14:11 -0800 |
commit | 4144bc861ed7934d56f16d2acd808d44af0fcc90 (patch) | |
tree | 6222f33987d662b3931deac4b9cea5d8cde4eb53 /drivers | |
parent | 757de81e8bc86d256d05d938dfd52be72a773525 (diff) | |
download | linux-4144bc861ed7934d56f16d2acd808d44af0fcc90.tar.bz2 |
usb: cdc-wdm: manage_power should always set needs_remote_wakeup
Cc: stable <stable@vger.kernel.org>
Reported-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/class/cdc-wdm.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index 4d387596f3f0..0b23a8639311 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c @@ -854,13 +854,11 @@ static int wdm_manage_power(struct usb_interface *intf, int on) { /* need autopm_get/put here to ensure the usbcore sees the new value */ int rv = usb_autopm_get_interface(intf); - if (rv < 0) - goto err; intf->needs_remote_wakeup = on; - usb_autopm_put_interface(intf); -err: - return rv; + if (!rv) + usb_autopm_put_interface(intf); + return 0; } static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id) |