Show
Ignore:
Timestamp:
03/16/08 18:30:20 (5 years ago)
Author:
khali
Message:

Don't choke on unrecognized devices, part 2. In case hwmon devices have
no underlying physical device, just ignore them. This happened in kernel
2.6.25-rc5-git4 with the newly added generic thermal zone device.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/lib/sysfs.c

    r5086 r5147  
    183183        dlist_for_each_data(clsdevs, clsdev, struct sysfs_class_device) { 
    184184                struct sysfs_device *dev; 
    185                 if (!(dev = sysfs_get_classdev_device(clsdev))) { 
    186                         ret = -SENSORS_ERR_PROC; 
    187                         goto exit; 
    188                 } 
     185                if (!(dev = sysfs_get_classdev_device(clsdev))) 
     186                        continue; 
    189187                if ((ret = sensors_read_one_sysfs_chip(dev))) 
    190188                        goto exit;