diff options
author | Wolfram Sang <wsa@kernel.org> | 2023-02-18 01:13:30 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2023-03-03 22:57:29 +0300 |
commit | 1d092308ce223bb1403475737b8fb847e9e8704c (patch) | |
tree | 5ebdd9e99be9e66d65d76cd077c93ef0da282e01 | |
parent | a76d19e6acb1ef16561b0682cd1a566463fa3d98 (diff) | |
download | linux-1d092308ce223bb1403475737b8fb847e9e8704c.tar.xz |
i2c: gxp: remove "empty" switch statement
There used to be error messages which had to go. Now, it only consists
of 'break's, so it can go.
Signed-off-by: Wolfram Sang <wsa@kernel.org>
-rw-r--r-- | drivers/i2c/busses/i2c-gxp.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/i2c/busses/i2c-gxp.c b/drivers/i2c/busses/i2c-gxp.c index da4c8e5a8039..352dedf6292f 100644 --- a/drivers/i2c/busses/i2c-gxp.c +++ b/drivers/i2c/busses/i2c-gxp.c @@ -126,19 +126,8 @@ static int gxp_i2c_master_xfer(struct i2c_adapter *adapter, time_left = wait_for_completion_timeout(&drvdata->completion, adapter->timeout); ret = num - drvdata->msgs_remaining; - if (time_left == 0) { - switch (drvdata->state) { - case GXP_I2C_WDATA_PHASE: - break; - case GXP_I2C_RDATA_PHASE: - break; - case GXP_I2C_ADDR_PHASE: - break; - default: - break; - } + if (time_left == 0) return -ETIMEDOUT; - } if (drvdata->state == GXP_I2C_ADDR_NACK || drvdata->state == GXP_I2C_DATA_NACK) |