Messages in this thread Patch in this message | | | From | qiumibaozi_1@163 ... | Subject | [PATCH 3/3] Remove redundant assignment | Date | Wed, 17 Mar 2021 20:29:22 +0800 |
| |
From: ganjisheng <ganjisheng@yulong.com>
Signed-off-by: ganjisheng <ganjisheng@yulong.com> --- drivers/mfd/88pm860x-i2c.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/mfd/88pm860x-i2c.c b/drivers/mfd/88pm860x-i2c.c index a000aed..c4852c9 100644 --- a/drivers/mfd/88pm860x-i2c.c +++ b/drivers/mfd/88pm860x-i2c.c @@ -34,10 +34,8 @@ int pm860x_reg_write(struct i2c_client *i2c, int reg, struct pm860x_chip *chip = i2c_get_clientdata(i2c); struct regmap *map = (i2c == chip->client) ? chip->regmap : chip->regmap_companion; - int ret; - ret = regmap_write(map, reg, data); - return ret; + return regmap_write(map, reg, data); } EXPORT_SYMBOL(pm860x_reg_write); @@ -47,10 +45,8 @@ int pm860x_bulk_read(struct i2c_client *i2c, int reg, struct pm860x_chip *chip = i2c_get_clientdata(i2c); struct regmap *map = (i2c == chip->client) ? chip->regmap : chip->regmap_companion; - int ret; - ret = regmap_raw_read(map, reg, buf, count); - return ret; + return regmap_raw_read(map, reg, buf, count); } EXPORT_SYMBOL(pm860x_bulk_read); @@ -60,10 +56,8 @@ int pm860x_bulk_write(struct i2c_client *i2c, int reg, struct pm860x_chip *chip = i2c_get_clientdata(i2c); struct regmap *map = (i2c == chip->client) ? chip->regmap : chip->regmap_companion; - int ret; - ret = regmap_raw_write(map, reg, buf, count); - return ret; + return regmap_raw_write(map, reg, buf, count); } EXPORT_SYMBOL(pm860x_bulk_write); @@ -73,10 +67,8 @@ int pm860x_set_bits(struct i2c_client *i2c, int reg, struct pm860x_chip *chip = i2c_get_clientdata(i2c); struct regmap *map = (i2c == chip->client) ? chip->regmap : chip->regmap_companion; - int ret; - ret = regmap_update_bits(map, reg, mask, data); - return ret; + return regmap_update_bits(map, reg, mask, data); } EXPORT_SYMBOL(pm860x_set_bits); -- 1.9.1
| |