Skip to content

Commit

Permalink
cdc-wdm: Don't clear WDM_READ unless entire read buffer is emptied
Browse files Browse the repository at this point in the history
The WDM_READ flag is cleared later iff desc->length is reduced to 0.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Tested-by: Bjørn Mork <bjorn@mork.no>
Cc: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Ben Hutchings authored and Greg Kroah-Hartman committed Feb 24, 2012
1 parent 0cedc4e commit b7a2055
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/usb/class/cdc-wdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ static ssize_t wdm_read
spin_unlock_irq(&desc->iuspin);
goto retry;
}
clear_bit(WDM_READ, &desc->flags);
cntr = desc->length;
spin_unlock_irq(&desc->iuspin);
}
Expand Down

0 comments on commit b7a2055

Please sign in to comment.