diff options
author | Bjørn Mork <bjorn@mork.no> | 2013-11-29 19:17:45 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-09 20:25:08 (GMT) |
commit | ca36cb27c934ec46bdb46b355ed57066bb1895b8 (patch) | |
tree | 520a4c07dd34d7e1f84310f8a15c4fdb154d2521 /drivers/usb/class | |
parent | 43d1db887c4642963b60ad9a2663f47812507b41 (diff) | |
download | linux-fsl-qoriq-ca36cb27c934ec46bdb46b355ed57066bb1895b8.tar.xz |
usb: cdc-wdm: manage_power should always set needs_remote_wakeup
commit 4144bc861ed7934d56f16d2acd808d44af0fcc90 upstream.
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/usb/class')
-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 d3318a0..6463ca3 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c @@ -820,13 +820,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) |