提交 76cb03e7 编写于 作者: O Oliver Neukum 提交者: 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: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册