Return the correct error code on I2C block read failure.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5074 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2007-12-15 22:35:17 +00:00
1 parent 8b094633cf
commit 291fd8c00c
2 files changed
+4 -1

No files matched your search

+1
View File
@@ -14,6 +14,7 @@ SVN-HEAD
Program decode-vaio.pl: Private data might not be readable by non-root users
Print the asset tag
Fix the timestamp decoding
Program i2cdump: Fix I2C block mode error code
Program pwmconfig: Better diagnostics in pwmdisable
Give the fans some time to spin up
Really hide errors on sysfs writes
+3 -1
View File
@@ -313,8 +313,10 @@ int main(int argc, char *argv[])
for (res = 0; res < 256; res += i) {
i = i2c_smbus_read_i2c_block_data(file,
res, 32, cblock + res);
if (i <= 0)
if (i <= 0) {
res = i;
break;
}
}
}
if (res <= 0) {