提交 a5dab869 编写于 作者: P Peter Rosin 提交者: Wolfram Sang

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: NPeter Rosin <peda@axentia.se>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 04305627
...@@ -377,17 +377,7 @@ static int hix5hd2_i2c_xfer(struct i2c_adapter *adap, ...@@ -377,17 +377,7 @@ static int hix5hd2_i2c_xfer(struct i2c_adapter *adap,
goto out; goto out;
} }
if (i == num) { ret = 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");
}
out: out:
pm_runtime_mark_last_busy(priv->dev); pm_runtime_mark_last_busy(priv->dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册