i2c: robotfuzz-osif: drop pointless test
authorPeter Rosin <peda@axentia.se>
Wed, 9 May 2018 19:46:58 +0000 (21:46 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 24 May 2018 20:13:04 +0000 (22:13 +0200)
In the for-loop test, ret will be either 0 or 1. So, the
comparison is pointless. Drop it, and drop the initializer
which is then also pointless.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-robotfuzz-osif.c

index 51d93b4b00f2105c2c721b1db1c6855cdf546982..d848cf5152349dde7d828a0ccf2e4389bb49182e 100644 (file)
@@ -62,10 +62,10 @@ static int osif_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs,
 {
        struct osif_priv *priv = adapter->algo_data;
        struct i2c_msg *pmsg;
-       int ret = 0;
+       int ret;
        int i;
 
-       for (i = 0; ret >= 0 && i < num; i++) {
+       for (i = 0; i < num; i++) {
                pmsg = &msgs[i];
 
                if (pmsg->flags & I2C_M_RD) {