Skip to content

Commit

Permalink
i2c: rcar: fix NACK error code
Browse files Browse the repository at this point in the history
The response to a bus NACK is to return -ENXIO instead of the
-EREMOTEIO being currently returned by the driver.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
  • Loading branch information
Ben Dooks authored and Wolfram Sang committed Jan 26, 2014
1 parent 25ee33f commit 6ff4b10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/i2c/busses/i2c-rcar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
Expand Down

0 comments on commit 6ff4b10

Please sign in to comment.