Commit 76cb03e7 authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8373856d
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment