Commit cbfe697c authored by Peter Rosin's avatar Peter Rosin Committed by Greg Kroah-Hartman

i2c: pmcmsp: fix error return from master_xfer

[ Upstream commit 12d9bbc5 ]

Returning -1 (-EPERM) is not appropriate here, go with -EIO.
Signed-off-by: default avatarPeter Rosin <peda@axentia.se>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Fixes: 1b144df1 ("i2c: New PMC MSP71xx TWI bus driver")
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0c188574
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment