public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: I2C: Return -ETIMEDOUT in octeon_i2c_wait() on timeout
@ 2010-09-27 10:55 Bernhard Walle
  2010-09-27 11:02 ` Wolfram Sang
  2010-09-27 17:32 ` David Daney
  0 siblings, 2 replies; 4+ messages in thread
From: Bernhard Walle @ 2010-09-27 10:55 UTC (permalink / raw)
  To: khali; +Cc: ddaney, rade.bozic.ext, linux-i2c, linux-kernel

It doesn't make sense to set result to -ETIMEDOUT but return 0 (success)
afterwards. Since there's code in octeon_i2c_start() to handle the
error, it should be called.

Signed-off-by: Bernhard Walle <walle@corscience.de>
---
 drivers/i2c/busses/i2c-octeon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c
index 0e9f85d..56dbe54 100644
--- a/drivers/i2c/busses/i2c-octeon.c
+++ b/drivers/i2c/busses/i2c-octeon.c
@@ -218,7 +218,7 @@ static int octeon_i2c_wait(struct octeon_i2c *i2c)
 		return result;
 	} else if (result == 0) {
 		dev_dbg(i2c->dev, "%s: timeout\n", __func__);
-		result = -ETIMEDOUT;
+		return -ETIMEDOUT;
 	}
 
 	return 0;
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-27 22:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-27 10:55 [PATCH] MIPS: I2C: Return -ETIMEDOUT in octeon_i2c_wait() on timeout Bernhard Walle
2010-09-27 11:02 ` Wolfram Sang
2010-09-27 17:32 ` David Daney
2010-09-27 22:12   ` Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox