Skip to content

Commit

Permalink
i2c: pmcmsp: fix error return from master_xfer
Browse files Browse the repository at this point in the history
Returning -1 (-EPERM) is not appropriate here, go with -EIO.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Fixes: 1b144df ("i2c: New PMC MSP71xx TWI bus driver")
  • Loading branch information
Peter Rosin authored and Wolfram Sang committed May 15, 2018
1 parent de9a863 commit 12d9bbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-pmcmsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ static int pmcmsptwi_master_xfer(struct i2c_adapter *adap,
* TODO: We could potentially loop and retry in the case
* of MSP_TWI_XFER_TIMEOUT.
*/
return -1;
return -EIO;
}

return num;
Expand Down

0 comments on commit 12d9bbc

Please sign in to comment.