Skip to content

Commit

Permalink
usb: cdc-wdm: manage_power should always set needs_remote_wakeup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bjørn Mork authored and Greg Kroah-Hartman committed Dec 9, 2013
1 parent 757de81 commit 4144bc8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/usb/class/cdc-wdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4144bc8

Please sign in to comment.