diff options
author | Peter Rosin | 2018-05-09 21:46:03 +0200 |
---|---|---|
committer | Wolfram Sang | 2018-05-15 10:43:38 +0200 |
commit | a5dab8698c70379baa35f23f7803a4c69aed0fc9 (patch) | |
tree | 7a755b5d7b9591355f193c1828ecf2bf74da27c6 /drivers/i2c/busses/i2c-hix5hd2.c | |
parent | i2c: exynos5: simplify transfer function (diff) | |
download | kernel-qcow2-linux-a5dab8698c70379baa35f23f7803a4c69aed0fc9.tar.gz kernel-qcow2-linux-a5dab8698c70379baa35f23f7803a4c69aed0fc9.tar.xz kernel-qcow2-linux-a5dab8698c70379baa35f23f7803a4c69aed0fc9.zip |
i2c: hix5hd2: remove some dead code
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>
Diffstat (limited to 'drivers/i2c/busses/i2c-hix5hd2.c')
-rw-r--r-- | drivers/i2c/busses/i2c-hix5hd2.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/i2c/busses/i2c-hix5hd2.c b/drivers/i2c/busses/i2c-hix5hd2.c index 1504c3c1a1c0..f69dd6e46f2d 100644 --- a/drivers/i2c/busses/i2c-hix5hd2.c +++ b/drivers/i2c/busses/i2c-hix5hd2.c @@ -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); |