[PATCH 4/4] i2c-imx: i2c_imx_xfer return with err if sub-transfer isn't successfull

Marc Kleine-Budde mkl at pengutronix.de
Wed Dec 9 09:42:34 EST 2009


Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
---
 drivers/i2c/i2c-imx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/i2c-imx.c b/drivers/i2c/i2c-imx.c
index c2a38ee..03e3785 100644
--- a/drivers/i2c/i2c-imx.c
+++ b/drivers/i2c/i2c-imx.c
@@ -457,6 +457,8 @@ static int i2c_imx_xfer(struct i2c_adapter *adapter,
 			result = i2c_imx_read(adapter, &msgs[i]);
 		else
 			result = i2c_imx_write(adapter, &msgs[i]);
+		if (result)
+			goto fail0;
 	}
 
 fail0:
-- 
1.6.5.4





More information about the u-boot-v2 mailing list