Browse Source

HID: usbhid: change return error of usbhid_output_report

If there is no urbout when sending a output report, ENOSYS (Function
not implemented) is a better error than EIO (I/O error).

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Benjamin Tissoires 11 years ago
parent
commit
ddea1af9d9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/hid/usbhid/hid-core.c

+ 1 - 1
drivers/hid/usbhid/hid-core.c

@@ -922,7 +922,7 @@ static int usbhid_output_report(struct hid_device *hid, __u8 *buf, size_t count)
 	int actual_length, skipped_report_id = 0, ret;
 	int actual_length, skipped_report_id = 0, ret;
 
 
 	if (!usbhid->urbout)
 	if (!usbhid->urbout)
-		return -EIO;
+		return -ENOSYS;
 
 
 	if (buf[0] == 0x0) {
 	if (buf[0] == 0x0) {
 		/* Don't send the Report ID */
 		/* Don't send the Report ID */