Skip to content

Commit

Permalink
i2c: gxp: remove "empty" switch statement
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wolfram Sang committed Mar 3, 2023
1 parent a76d19e commit 1d09230
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/i2c/busses/i2c-gxp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1d09230

Please sign in to comment.