Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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: default avatarOliver Neukum <oneukum@suse.de&gt;0>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8373856d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -339,7 +339,7 @@ static ssize_t wdm_write
	desc->werr = 0;
	desc->werr = 0;
	spin_unlock_irq(&desc->iuspin);
	spin_unlock_irq(&desc->iuspin);
	if (we < 0)
	if (we < 0)
		return -EIO;
		return usb_translate_errors(we);


	buf = kmalloc(count, GFP_KERNEL);
	buf = kmalloc(count, GFP_KERNEL);
	if (!buf) {
	if (!buf) {