mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-19 19:40:49 +00:00
Drop SENSORS_ERR_NO_DEVS: we return success, not error, when no device
is found. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4879 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
38d16d299d
commit
6c229f7a3c
3 files changed
+6
-8
No files matched your search
+4
-4
@@ -437,13 +437,13 @@ static int sensors_read_sysfs_chips_compat(void)
|
||||
|
||||
if (!(bus = sysfs_open_bus("i2c"))) {
|
||||
if (errno && errno != ENOENT)
|
||||
ret = -SENSORS_ERR_NO_DEVS;
|
||||
ret = -SENSORS_ERR_KERNEL;
|
||||
goto exit0;
|
||||
}
|
||||
|
||||
if (!(devs = sysfs_get_bus_devices(bus))) {
|
||||
if (errno && errno != ENOENT)
|
||||
ret = -SENSORS_ERR_NO_DEVS;
|
||||
ret = -SENSORS_ERR_KERNEL;
|
||||
goto exit1;
|
||||
}
|
||||
|
||||
@@ -474,14 +474,14 @@ int sensors_read_sysfs_chips(void)
|
||||
|
||||
if (!(clsdevs = sysfs_get_class_devices(cls))) {
|
||||
if (errno && errno != ENOENT)
|
||||
ret = -SENSORS_ERR_NO_DEVS;
|
||||
ret = -SENSORS_ERR_KERNEL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
dlist_for_each_data(clsdevs, clsdev, struct sysfs_class_device) {
|
||||
struct sysfs_device *dev;
|
||||
if (!(dev = sysfs_get_classdev_device(clsdev))) {
|
||||
ret = -SENSORS_ERR_NO_DEVS;
|
||||
ret = -SENSORS_ERR_KERNEL;
|
||||
goto exit;
|
||||
}
|
||||
if ((ret = sensors_read_one_sysfs_chip(dev)))
|
||||
|
||||
Reference in new issue
Block a user