diff options
Diffstat (limited to 'drivers/usb/class/cdc-wdm.c')
-rw-r--r-- | drivers/usb/class/cdc-wdm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index 1c50baff7725..1f6b5c8394b4 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c | |||
@@ -467,7 +467,9 @@ retry: | |||
467 | for (i = 0; i < desc->length - cntr; i++) | 467 | for (i = 0; i < desc->length - cntr; i++) |
468 | desc->ubuf[i] = desc->ubuf[i + cntr]; | 468 | desc->ubuf[i] = desc->ubuf[i + cntr]; |
469 | 469 | ||
470 | spin_lock_irq(&desc->iuspin); | ||
470 | desc->length -= cntr; | 471 | desc->length -= cntr; |
472 | spin_unlock_irq(&desc->iuspin); | ||
471 | /* in case we had outstanding data */ | 473 | /* in case we had outstanding data */ |
472 | if (!desc->length) | 474 | if (!desc->length) |
473 | clear_bit(WDM_READ, &desc->flags); | 475 | clear_bit(WDM_READ, &desc->flags); |