All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH 2.6] I2C: Fix sgi_xfer return value
@ 2005-09-02 21:28 Jean Delvare
  0 siblings, 0 replies; only message in thread
From: Jean Delvare @ 2005-09-02 21:28 UTC (permalink / raw)
  To: lm-sensors

Hi all, Greg,

The sgi_xfer function returns 0 on success instead of the number of
transfered messages as it is supposed to. This patch fixes that.

Let's just hope that no client chip driver was relying on this
misbehavior.

Signed-off-by: Jean Delvare <khali@linux-fr.org>

 drivers/i2c/algos/i2c-algo-sgi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.13.orig/drivers/i2c/algos/i2c-algo-sgi.c	2005-08-29 20:55:01.000000000 +0200
+++ linux-2.6.13/drivers/i2c/algos/i2c-algo-sgi.c	2005-09-02 21:20:08.000000000 +0200
@@ -149,7 +149,7 @@
 			err = i2c_write(adap, p->buf, p->len);
 	}
 
-	return err;
+	return (err < 0) ? err : i;
 }
 
 static u32 sgi_func(struct i2c_adapter *adap)


-- 
Jean Delvare

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-02 21:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-02 21:28 [lm-sensors] [PATCH 2.6] I2C: Fix sgi_xfer return value Jean Delvare

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.