[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>
This commit is contained in:
Jean Delvare 2005-09-02 21:28:00 +02:00 коммит произвёл Greg Kroah-Hartman
Родитель d1b2f0a975
Коммит a89923fff7
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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)