lkml.org 
[lkml]   [2021]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] Remove redundant assignment
Date
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

\
 
 \ /
  Last update: 2021-03-17 13:31    [W:0.067 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site