diff options
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index ed988effdf07..29e76be1d5eb 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -191,7 +191,13 @@ static int acm_write_start(struct acm *acm, int wbn) dev_vdbg(&acm->data->dev, "%s - susp_count %d\n", __func__, acm->susp_count); - usb_autopm_get_interface_async(acm->control); + rc = usb_autopm_get_interface_async(acm->control); + if (rc) { + wb->use = 0; + spin_unlock_irqrestore(&acm->write_lock, flags); + return rc; + } + if (acm->susp_count) { usb_anchor_urb(wb->urb, &acm->delayed); spin_unlock_irqrestore(&acm->write_lock, flags); |