Skip to content

Commit 8c266d0

Browse files
tititiou36wsakernel
authored andcommitted
i2c: xiic: Remove some dead code
wait_for_completion_timeout() never returns negative value. Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Michal Simek <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 6d8ffbe commit 8c266d0

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/i2c/busses/i2c-xiic.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,10 +1174,6 @@ static int xiic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
11741174
i2c->rx_msg = NULL;
11751175
i2c->nmsgs = 0;
11761176
err = -ETIMEDOUT;
1177-
} else if (err < 0) { /* Completion error */
1178-
i2c->tx_msg = NULL;
1179-
i2c->rx_msg = NULL;
1180-
i2c->nmsgs = 0;
11811177
} else {
11821178
err = (i2c->state == STATE_DONE) ? num : -EIO;
11831179
}

0 commit comments

Comments
 (0)