Commit e4d6bc38 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Wolfram Sang

i2c: meson: remove variable count from meson_i2c_xfer

Variable count has always the same value as i, so we don't need it.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 47bb8f71
...@@ -367,7 +367,7 @@ static int meson_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, ...@@ -367,7 +367,7 @@ static int meson_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
int num) int num)
{ {
struct meson_i2c *i2c = adap->algo_data; struct meson_i2c *i2c = adap->algo_data;
int i, ret = 0, count = 0; int i, ret = 0;
clk_enable(i2c->clk); clk_enable(i2c->clk);
...@@ -375,12 +375,11 @@ static int meson_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, ...@@ -375,12 +375,11 @@ static int meson_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
ret = meson_i2c_xfer_msg(i2c, msgs + i, i == num - 1); ret = meson_i2c_xfer_msg(i2c, msgs + i, i == num - 1);
if (ret) if (ret)
break; break;
count++;
} }
clk_disable(i2c->clk); clk_disable(i2c->clk);
return ret ? ret : count; return ret ?: i;
} }
static u32 meson_i2c_func(struct i2c_adapter *adap) static u32 meson_i2c_func(struct i2c_adapter *adap)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment