From 85e8a0b9a3565c8185068b6b340cc8c6dd4411f4 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Mon, 23 Mar 2015 14:34:43 +0100 Subject: [PATCH] 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 --- drivers/usb/class/cdc-wdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } /* -- 2.30.2