Commit 6ff4b105 authored by Ben Dooks's avatar Ben Dooks Committed by Wolfram Sang

i2c: rcar: fix NACK error code

The response to a bus NACK is to return -ENXIO instead of the
-EREMOTEIO being currently returned by the driver.
Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 25ee33fb
......@@ -598,7 +598,7 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
* error handling
*/
if (rcar_i2c_flags_has(priv, ID_NACK)) {
ret = -EREMOTEIO;
ret = -ENXIO;
break;
}
......@@ -617,7 +617,7 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
pm_runtime_put(dev);
if (ret < 0 && ret != -EREMOTEIO)
if (ret < 0 && ret != -ENXIO)
dev_err(dev, "error %d : %x\n", ret, priv->flags);
return ret;
......
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