summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-10-22 00:30:26 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2010-10-28 22:30:37 (GMT)
commit25d950714781f34e7ae1292f38889cf39983cb38 (patch)
treee89653e3a0d630e8ae171b67f509d451c0e95ea7
parent1558b51eb7c813b3d90bdd68057403f7cac191fa (diff)
downloadlinux-25d950714781f34e7ae1292f38889cf39983cb38.tar.xz
mfd: Remove unneeded ret value checking for max8998 register updates
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>
-rw-r--r--drivers/mfd/max8998.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c
index a720f41..06ddf74 100644
--- 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;