Browse Source

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 <oneukum@suse.com>0
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oliver Neukum 10 năm trước cách đây
mục cha
commit
85e8a0b9a3
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      drivers/usb/class/cdc-wdm.c

+ 1 - 1
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;
 		}
 		/*