projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1558b51
)
mfd: Remove unneeded ret value checking for max8998 register updates
author
Axel Lin
<axel.lin@gmail.com>
Fri, 22 Oct 2010 00:30:26 +0000
(08:30 +0800)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Thu, 28 Oct 2010 22:30:37 +0000
(
00:30
+0200)
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>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/max8998.c
patch
|
blob
|
history
diff --git
a/drivers/mfd/max8998.c
b/drivers/mfd/max8998.c
index a720f412cd15b0ff13b280f8de2edb1fc3291068..06ddf741d4c772affc9c3c7980597f75f92ce244 100644
(file)
--- a/
drivers/mfd/max8998.c
+++ b/
drivers/mfd/max8998.c
@@
-110,8
+110,6
@@
int max8998_update_reg(struct i2c_client *i2c, u8 reg, u8 val, u8 mask)
u8 old_val = ret & 0xff;
u8 new_val = (val & mask) | (old_val & (~mask));
ret = i2c_smbus_write_byte_data(i2c, reg, new_val);
- if (ret >= 0)
- ret = 0;
}
mutex_unlock(&max8998->iolock);
return ret;