From: Ben Hutchings Date: Sun, 12 Feb 2012 06:02:43 +0000 (+0000) Subject: cdc-wdm: Don't clear WDM_READ unless entire read buffer is emptied X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b7a205545345578712611106b371538992e142ff;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git cdc-wdm: Don't clear WDM_READ unless entire read buffer is emptied The WDM_READ flag is cleared later iff desc->length is reduced to 0. Signed-off-by: Ben Hutchings Tested-by: Bjørn Mork Cc: Oliver Neukum Cc: stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index 7ca54d4dea92..6037b503153f 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c @@ -455,7 +455,6 @@ retry: spin_unlock_irq(&desc->iuspin); goto retry; } - clear_bit(WDM_READ, &desc->flags); cntr = desc->length; spin_unlock_irq(&desc->iuspin); }