* [lm-sensors] [PATCH] I2C: Fix sgi_xfer return value
@ 2005-09-05 23:47 Greg KH
0 siblings, 0 replies; only message in thread
From: Greg KH @ 2005-09-05 23:47 UTC (permalink / raw)
To: lm-sensors
[PATCH] I2C: Fix sgi_xfer return value
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
commit a89923fff79f8eeed0ccdf51e13453754e48a71e
tree 8fbf4d2ad1fce9452404b081035b30c579f3753a
parent d1b2f0a9754d3087ee29b3e88b8f20f2d30090d3
author Jean Delvare <khali@linux-fr.org> Fri, 02 Sep 2005 21:28:00 +0200
committer Greg Kroah-Hartman <gregkh@suse.de> Mon, 05 Sep 2005 09:26:54 -0700
drivers/i2c/algos/i2c-algo-sgi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/algos/i2c-algo-sgi.c b/drivers/i2c/algos/i2c-algo-sgi.c
--- a/drivers/i2c/algos/i2c-algo-sgi.c
+++ b/drivers/i2c/algos/i2c-algo-sgi.c
@@ -149,7 +149,7 @@ static int sgi_xfer(struct i2c_adapter *
err = i2c_write(adap, p->buf, p->len);
}
- return err;
+ return (err < 0) ? err : i;
}
static u32 sgi_func(struct i2c_adapter *adap)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-05 23:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-05 23:47 [lm-sensors] [PATCH] I2C: Fix sgi_xfer return value Greg KH
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.