summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2023-02-15 11:38:07 +0100
committerWolfram Sang <wsa@kernel.org>2023-02-17 22:46:10 +0100
commit8c266d060894a1c979ccc7b233f34ef545e48b09 (patch)
treeb25778595ec581d9e87eeb7edc560daf68e2e839 /drivers/i2c
parenti2c: xiic: Add SCL frequency configuration support (diff)
downloadlinux-8c266d060894a1c979ccc7b233f34ef545e48b09.tar.xz
linux-8c266d060894a1c979ccc7b233f34ef545e48b09.zip
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-xiic.c4
1 files changed, 0 insertions, 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;
}