aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-08-09 05:01:21 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-08-11 06:38:02 -0400
commit1bddc2f5c1727577183761581d5d4d1b00a8bd63 (patch)
treed0c7817f6ad349ce4f12f638c0e09cbb2dfcb365
parent53a4befa4e3d1490a63dae1ac03a2e7c865b2f53 (diff)
regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write()
i2c_smbus_write_byte_data() returns zero or negative value, therefore no need to check if ret is greater than zero or not. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
-rw-r--r--drivers/regulator/lp3971.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
index 5362289c7d69..3bb82b624e19 100644
--- a/drivers/regulator/lp3971.c
+++ b/drivers/regulator/lp3971.c
@@ -387,15 +387,9 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count,
387static int lp3971_i2c_write(struct i2c_client *i2c, char reg, int count, 387static int lp3971_i2c_write(struct i2c_client *i2c, char reg, int count,
388 const u16 *src) 388 const u16 *src)
389{ 389{
390 int ret;
391
392 if (count != 1) 390 if (count != 1)
393 return -EIO; 391 return -EIO;
394 ret = i2c_smbus_write_byte_data(i2c, reg, *src); 392 return i2c_smbus_write_byte_data(i2c, reg, *src);
395 if (ret >= 0)
396 return 0;
397
398 return ret;
399} 393}
400 394
401static u8 lp3971_reg_read(struct lp3971 *lp3971, u8 reg) 395static u8 lp3971_reg_read(struct lp3971 *lp3971, u8 reg)