ALSA: line6: Return EIO if read/write not successful
authorChris Rorvick <chris@rorvick.com>
Wed, 11 Feb 2015 05:03:15 +0000 (23:03 -0600)
committerTakashi Iwai <tiwai@suse.de>
Wed, 11 Feb 2015 09:37:43 +0000 (10:37 +0100)
Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/line6/driver.c

index f2ee8046271a256076acf4568dc4aeaabeb4fd9b..6c2d418b53f19c9697531cea4644b02c753949fc 100644 (file)
@@ -349,7 +349,7 @@ int line6_read_data(struct usb_line6 *line6, int address, void *data,
                dev_err(line6->ifcdev,
                        "length mismatch (expected %d, got %d)\n",
                        (int)datalen, (int)len);
-               return -EINVAL;
+               return -EIO;
        }
 
        /* receive the result: */
@@ -415,7 +415,7 @@ int line6_write_data(struct usb_line6 *line6, int address, void *data,
                return -EIO;
        } else if (status != 0) {
                dev_err(line6->ifcdev, "write failed (error %d)\n", ret);
-               return -EINVAL;
+               return -EIO;
        }
 
        return 0;