Prev: [PATCH 1/2 RESEND] regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write()
Next: [tip:x86/urgent] x86, apic: Map the local apic when parsing the MP table.
From: Axel Lin on 5 Aug 2010 20:20 We already check count value before calling i2c_smbus_read_byte_data(), no need to check it again. Signed-off-by: Axel Lin <axel.lin(a)gmail.com> Acked-by: Mark Brown <broonie(a)opensource.wolfsonmicro.com> --- This resend adds regulator: prefix in the subject line. drivers/regulator/lp3971.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c index d4d9822..3bb82b6 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; -- 1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |