diff options
Diffstat (limited to 'drivers/usb/class/cdc-wdm.c')
-rw-r--r-- | drivers/usb/class/cdc-wdm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index 5aacea1978a5..3e865dbf878c 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c | |||
@@ -190,8 +190,10 @@ static void wdm_in_callback(struct urb *urb) | |||
190 | /* | 190 | /* |
191 | * only set a new error if there is no previous error. | 191 | * only set a new error if there is no previous error. |
192 | * Errors are only cleared during read/open | 192 | * Errors are only cleared during read/open |
193 | * Avoid propagating -EPIPE (stall) to userspace since it is | ||
194 | * better handled as an empty read | ||
193 | */ | 195 | */ |
194 | if (desc->rerr == 0) | 196 | if (desc->rerr == 0 && status != -EPIPE) |
195 | desc->rerr = status; | 197 | desc->rerr = status; |
196 | 198 | ||
197 | if (length + desc->length > desc->wMaxCommand) { | 199 | if (length + desc->length > desc->wMaxCommand) { |