USB: add EOPNOTSUPP to usb_translate_errors
authorJohan Hovold <jhovold@gmail.com>
Mon, 26 Mar 2012 19:01:50 +0000 (21:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Apr 2012 20:46:41 +0000 (13:46 -0700)
Allow drivers to return EOPNOTSUPP to user space even when filtered
through usb_translate_errors.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/usb.h

index 73b68d1f2cb01a2da4fbb65bd5bb319b51ac690e..22e9b328975b861c9388f810aef9c1e21bdef0c7 100644 (file)
@@ -1627,6 +1627,7 @@ static inline int usb_translate_errors(int error_code)
        case 0:
        case -ENOMEM:
        case -ENODEV:
+       case -EOPNOTSUPP:
                return error_code;
        default:
                return -EIO;