From 8c266d060894a1c979ccc7b233f34ef545e48b09 Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Wed, 15 Feb 2023 11:38:07 +0100 Subject: [PATCH] i2c: xiic: Remove some dead code wait_for_completion_timeout() never returns negative value. Signed-off-by: Christophe JAILLET Reviewed-by: Michal Simek Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-xiic.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 1e89e8270749..dbb792fc197e 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -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; }