chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] clean up the aoe char device rules, and delete the block one as it's not...
[elogind.git]
/
libsysfs
/
sysfs_class.c
diff --git
a/libsysfs/sysfs_class.c
b/libsysfs/sysfs_class.c
index 59ef0be48e193024ae313da644189c47027fad24..a132bb64cbc097a989e52a8ddeeeda2bdf69ddaa 100644
(file)
--- a/
libsysfs/sysfs_class.c
+++ b/
libsysfs/sysfs_class.c
@@
-20,7
+20,7
@@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-#include "
sysfs/
libsysfs.h"
+#include "libsysfs.h"
#include "sysfs.h"
static void sysfs_close_cls_dev(void *dev)
#include "sysfs.h"
static void sysfs_close_cls_dev(void *dev)
@@
-640,6
+640,9
@@
struct sysfs_attribute *sysfs_get_classdev_attr
return cur;
}
return cur;
}
+ if (clsdev->directory == NULL)
+ return NULL;
+
if (clsdev->directory->subdirs == NULL)
if ((sysfs_read_dir_subdirs(clsdev->directory)) != 0 ||
clsdev->directory->subdirs == NULL)
if (clsdev->directory->subdirs == NULL)
if ((sysfs_read_dir_subdirs(clsdev->directory)) != 0 ||
clsdev->directory->subdirs == NULL)