From cf3682e33fbf24f8c6adf3b7f88c15f837f23190 Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Mon, 13 Aug 2012 09:49:43 -0400 Subject: Fixed i2c error return value --- i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i2c.c b/i2c.c index 4c1499d..9dc4fe9 100644 --- a/i2c.c +++ b/i2c.c @@ -43,7 +43,7 @@ guchar I2C_Read(gulong address) { int device = open(I2C_BUS, O_RDWR); - if (device == -1) return device; + if (device == -1) return 0; ioctl(device, I2C_SLAVE, address); ioctl(device, I2C_SMBUS, &argsread); -- cgit