summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-09-02 21:28:00 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-05 09:26:54 -0700
commita89923fff79f8eeed0ccdf51e13453754e48a71e (patch)
tree8fbf4d2ad1fce9452404b081035b30c579f3753a /drivers/i2c
parentd1b2f0a9754d3087ee29b3e88b8f20f2d30090d3 (diff)
[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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/algos/i2c-algo-sgi.c2
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
index 2f8df81317ff..932c4fa86c73 100644
--- 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 *i2c_adap, struct i2c_msg *msgs,
err = i2c_write(adap, p->buf, p->len);
}
- return err;
+ return (err < 0) ? err : i;
}
static u32 sgi_func(struct i2c_adapter *adap)