Commit 4144bc86 authored by Bjørn Mork's avatar Bjørn Mork Committed by Greg Kroah-Hartman

usb: cdc-wdm: manage_power should always set needs_remote_wakeup

Cc: stable <stable@vger.kernel.org>
Reported-by: default avatarOliver Neukum <oneukum@suse.de>
Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
Acked-by: default avatarOliver Neukum <oneukum@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 757de81e
...@@ -854,13 +854,11 @@ static int wdm_manage_power(struct usb_interface *intf, int on) ...@@ -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 */ /* need autopm_get/put here to ensure the usbcore sees the new value */
int rv = usb_autopm_get_interface(intf); int rv = usb_autopm_get_interface(intf);
if (rv < 0)
goto err;
intf->needs_remote_wakeup = on; intf->needs_remote_wakeup = on;
if (!rv)
usb_autopm_put_interface(intf); usb_autopm_put_interface(intf);
err: return 0;
return rv;
} }
static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id) static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment