diff options
Diffstat (limited to 'lib/sysfs_device.c')
-rw-r--r-- | lib/sysfs_device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sysfs_device.c b/lib/sysfs_device.c index 3b2030d..e14d12a 100644 --- a/lib/sysfs_device.c +++ b/lib/sysfs_device.c @@ -372,8 +372,10 @@ struct sysfs_root_device *sysfs_open_root_device(const unsigned char *name) */ struct dlist *sysfs_get_device_attributes(struct sysfs_device *device) { - if (device == NULL) + if (device == NULL) { + errno = EINVAL; return NULL; + } if (device->directory == NULL) { device->directory = sysfs_open_directory(device->path); |