projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8373856
)
cdc-wdm: return correct error codes
author
Oliver Neukum
<oneukum@suse.de>
Fri, 20 Mar 2015 13:28:56 +0000
(14:28 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 09:50:52 +0000
(10:50 +0100)
Lieing to user space is wrong. The real reason for a failure
to write should be returned to user space.
Signed-off-by: Oliver Neukum <oneukum@suse.de>0
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-wdm.c
patch
|
blob
|
history
diff --git
a/drivers/usb/class/cdc-wdm.c
b/drivers/usb/class/cdc-wdm.c
index a051a7a2b1bd534a93fd459da7c553e0a5af4dfa..f053b41fae7f2ae79ded3a2e2908836dd2f3607c 100644
(file)
--- a/
drivers/usb/class/cdc-wdm.c
+++ b/
drivers/usb/class/cdc-wdm.c
@@
-339,7
+339,7
@@
static ssize_t wdm_write
desc->werr = 0;
spin_unlock_irq(&desc->iuspin);
if (we < 0)
- return
-EIO
;
+ return
usb_translate_errors(we)
;
buf = kmalloc(count, GFP_KERNEL);
if (!buf) {