summaryrefslogtreecommitdiffstats
path: root/drivers/usb/class
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2015-03-20 14:28:56 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-26 10:50:52 +0100
commit76cb03e7d5d7ba49175784dce961696da66c44cc (patch)
tree7cb27283cacbb68c9924d93e5a2e0e0add77d7a0 /drivers/usb/class
parent8373856d94aae5adf25f9e3388747c53867f1ab0 (diff)
downloadtalos-op-linux-76cb03e7d5d7ba49175784dce961696da66c44cc.tar.gz
talos-op-linux-76cb03e7d5d7ba49175784dce961696da66c44cc.zip
cdc-wdm: return correct error codes
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>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r--drivers/usb/class/cdc-wdm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index a051a7a2b1bd..f053b41fae7f 100644
--- 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) {
OpenPOWER on IntegriCloud