From 27ef7f00c96e45192d5dcc7e4589376f3a2fded3 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 6 Aug 2010 08:09:14 +0800 Subject: [PATCH] regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write() We already check count value before calling i2c_smbus_read_byte_data(), no need to check it again. Signed-off-by: Axel Lin Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- drivers/regulator/lp3971.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c index 8ae3732..5362289 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, if (count != 1) return -EIO; ret = i2c_smbus_read_byte_data(i2c, reg); - if (ret < 0 || count != 1) + if (ret < 0) return -EIO; *dest = ret; -- 2.7.4