Commit 1d092308 authored by Wolfram Sang's avatar Wolfram Sang
Browse files

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: default avatarWolfram Sang <wsa@kernel.org>
parent a76d19e6
Loading
Loading
Loading
Loading
+1 −12
Original line number Original line Diff line number Diff line
@@ -126,19 +126,8 @@ static int gxp_i2c_master_xfer(struct i2c_adapter *adapter,
	time_left = wait_for_completion_timeout(&drvdata->completion,
	time_left = wait_for_completion_timeout(&drvdata->completion,
						adapter->timeout);
						adapter->timeout);
	ret = num - drvdata->msgs_remaining;
	ret = num - drvdata->msgs_remaining;
	if (time_left == 0) {
	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;
		}
		return -ETIMEDOUT;
		return -ETIMEDOUT;
	}


	if (drvdata->state == GXP_I2C_ADDR_NACK ||
	if (drvdata->state == GXP_I2C_ADDR_NACK ||
	    drvdata->state == GXP_I2C_DATA_NACK)
	    drvdata->state == GXP_I2C_DATA_NACK)