diff options
Diffstat (limited to 'drivers/regulator/lp3971.c')
-rw-r--r-- | drivers/regulator/lp3971.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c index 8ae3732eb24b..3bb82b624e19 100644 --- a/drivers/regulator/lp3971.c +++ b/drivers/regulator/lp3971.c | |||
@@ -377,7 +377,7 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count, | |||
377 | if (count != 1) | 377 | if (count != 1) |
378 | return -EIO; | 378 | return -EIO; |
379 | ret = i2c_smbus_read_byte_data(i2c, reg); | 379 | ret = i2c_smbus_read_byte_data(i2c, reg); |
380 | if (ret < 0 || count != 1) | 380 | if (ret < 0) |
381 | return -EIO; | 381 | return -EIO; |
382 | 382 | ||
383 | *dest = ret; | 383 | *dest = ret; |
@@ -387,15 +387,9 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count, | |||
387 | static int lp3971_i2c_write(struct i2c_client *i2c, char reg, int count, | 387 | static 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 | ||
401 | static u8 lp3971_reg_read(struct lp3971 *lp3971, u8 reg) | 395 | static u8 lp3971_reg_read(struct lp3971 *lp3971, u8 reg) |