Skip to content

Commit

Permalink
ALSA: line6: Return EIO if read/write not successful
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Rorvick <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
crorvick authored and tiwai committed Feb 11, 2015
1 parent f3dfd1b commit e474e7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/usb/line6/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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: */
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e474e7f

Please sign in to comment.