* [PATCH 2/2] lp3971: remove redundant checking for count in lp3971_i2c_read()
@ 2010-08-05 3:42 Axel Lin
2010-08-05 12:12 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2010-08-05 3:42 UTC (permalink / raw)
To: linux-kernel; +Cc: Liam Girdwood, Mark Brown, Marek Szyprowski, Kyungmin Park
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@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-05 12:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-05 3:42 [PATCH 2/2] lp3971: remove redundant checking for count in lp3971_i2c_read() Axel Lin
2010-08-05 12:12 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox