projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b52cc5d
)
usb: cdc-wdm: manage_power should always set needs_remote_wakeup
author
Bjørn Mork
<bjorn@mork.no>
Fri, 29 Nov 2013 19:17:45 +0000
(20:17 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 20:24:20 +0000
(12:24 -0800)
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>
drivers/usb/class/cdc-wdm.c
patch
|
blob
|
history
diff --git
a/drivers/usb/class/cdc-wdm.c
b/drivers/usb/class/cdc-wdm.c
index d3318a0df8ee503f4f5ee553cda3ff1391298be4..6463ca3bcfbacee84d0155291f10df812f650940 100644
(file)
--- 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)