diff options
-rw-r--r-- | drivers/i2c/busses/i2c-gxp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-gxp.c b/drivers/i2c/busses/i2c-gxp.c index 352dedf6292f..fda7809e72ba 100644 --- a/drivers/i2c/busses/i2c-gxp.c +++ b/drivers/i2c/busses/i2c-gxp.c @@ -129,8 +129,10 @@ static int gxp_i2c_master_xfer(struct i2c_adapter *adapter, if (time_left == 0) return -ETIMEDOUT; - if (drvdata->state == GXP_I2C_ADDR_NACK || - drvdata->state == GXP_I2C_DATA_NACK) + if (drvdata->state == GXP_I2C_ADDR_NACK) + return -ENXIO; + + if (drvdata->state == GXP_I2C_DATA_NACK) return -EIO; return ret; |