@@ -42,7 +42,8 @@ static int tda8261_read(struct tda8261_state *state, u8 *buf)
int err = 0;
struct i2c_msg msg = { .addr = config->addr, .flags = I2C_M_RD,.buf = buf, .len = 1 };
- if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1)
+ err = i2c_transfer(state->i2c, &msg, 1);
+ if (err != 1)
pr_err("%s: read error, err=%d\n", __func__, err);
return err;
@@ -54,7 +55,8 @@ static int tda8261_write(struct tda8261_state *state, u8 *buf)
int err = 0;
struct i2c_msg msg = { .addr = config->addr, .flags = 0, .buf = buf, .len = 4 };
- if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1)
+ err = i2c_transfer(state->i2c, &msg, 1);
+ if (err != 1)
pr_err("%s: write error, err=%d\n", __func__, err);
return err;
@@ -67,8 +69,8 @@ static int tda8261_get_status(struct dvb_frontend *fe, u32 *status)
int err = 0;
*status = 0;
-
- if ((err = tda8261_read(state, &result)) < 0) {
+ err = tda8261_read(state, &result);
+ if (err < 0) {
pr_err("%s: I/O Error\n", __func__);
return err;
}