From: Oliver Neukum Date: Mon, 23 Mar 2015 13:34:43 +0000 (+0100) Subject: cdc-wdm: error returns need to be translated X-Git-Tag: v4.13~5437^2~41 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=85e8a0b9a3565c8185068b6b340cc8c6dd4411f4;p=mirror_ubuntu-bionic-kernel.git cdc-wdm: error returns need to be translated One more case of error codes not correctly being correctly returned to user space. Signed-off-by: Olive Neukum 0 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index 8e32b8d8115e..61ea87917433 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c @@ -522,9 +522,9 @@ retry: spin_lock_irq(&desc->iuspin); if (desc->rerr) { /* read completed, error happened */ + rv = usb_translate_errors(desc->rerr); desc->rerr = 0; spin_unlock_irq(&desc->iuspin); - rv = -EIO; goto err; } /*