summaryrefslogtreecommitdiff
path: root/lib/sysfs_device.c
diff options
context:
space:
mode:
authormananth <mananth>2004-02-09 05:50:48 +0000
committermananth <mananth>2004-02-09 05:50:48 +0000
commitaa50f4d223556481b96d775a71d88eb8f848bf64 (patch)
tree7a0e0760f9ead3d71a538a688311780afb0b100e /lib/sysfs_device.c
parent6cbd7ae67a04b1f0c3269ab3aae2d8ee0efa5a89 (diff)
downloadsysfsutils_0_5.tar.gz
Miscellaneous fixes in sysfs_device/driver.csysfsutils_0_5
Diffstat (limited to 'lib/sysfs_device.c')
-rw-r--r--lib/sysfs_device.c4
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);