i2c: hix5hd2: remove some dead code
authorPeter Rosin <peda@axentia.se>
Wed, 9 May 2018 19:46:03 +0000 (21:46 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 15 May 2018 08:43:38 +0000 (10:43 +0200)
The else branch cannot be taken as i will always equal num.
Get rid of the whole construct.

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

index 1504c3c1a1c06c0aa1558c99bd09bf139af1d124..f69dd6e46f2df1aa48539f4288c01eb64d1115a5 100644 (file)
@@ -377,17 +377,7 @@ static int hix5hd2_i2c_xfer(struct i2c_adapter *adap,
                        goto out;
        }
 
-       if (i == num) {
-               ret = num;
-       } else {
-               /* Only one message, cannot access the device */
-               if (i == 1)
-                       ret = -EREMOTEIO;
-               else
-                       ret = i;
-
-               dev_warn(priv->dev, "xfer message failed\n");
-       }
+       ret = num;
 
 out:
        pm_runtime_mark_last_busy(priv->dev);