i2c: xiic: Remove some dead code

wait_for_completion_timeout() never returns negative value.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
Christophe JAILLET 2023-02-15 11:38:07 +01:00 committed by Wolfram Sang
parent 6d8ffbe661
commit 8c266d0608

View File

@ -1174,10 +1174,6 @@ static int xiic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
i2c->rx_msg = NULL;
i2c->nmsgs = 0;
err = -ETIMEDOUT;
} else if (err < 0) { /* Completion error */
i2c->tx_msg = NULL;
i2c->rx_msg = NULL;
i2c->nmsgs = 0;
} else {
err = (i2c->state == STATE_DONE) ? num : -EIO;
}