summaryrefslogtreecommitdiff
path: root/fs/sysfs/file.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-02-24 13:23:23 +0900
committerPaul Mundt <lethal@linux-sh.org>2012-02-24 13:23:23 +0900
commit35eb304b5cd7b49d581bda79218b8134f3b689ea (patch)
tree3d75d9ada70814161d035b2f9166fee05d257dfb /fs/sysfs/file.c
parentca0cc30109241f280eb871794620d7cf198bb582 (diff)
parentbb4c7e9a9908548b458f34afb2fee74dc0d49f90 (diff)
downloadlinux-3.10-35eb304b5cd7b49d581bda79218b8134f3b689ea.tar.gz
linux-3.10-35eb304b5cd7b49d581bda79218b8134f3b689ea.tar.bz2
linux-3.10-35eb304b5cd7b49d581bda79218b8134f3b689ea.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into rmobile-fixes-for-linus
Diffstat (limited to 'fs/sysfs/file.c')
-rw-r--r--fs/sysfs/file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 62f4fb37789..00012e31829 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -493,6 +493,12 @@ int sysfs_attr_ns(struct kobject *kobj, const struct attribute *attr,
const void *ns = NULL;
int err;
+ if (!dir_sd) {
+ WARN(1, KERN_ERR "sysfs: kobject %s without dirent\n",
+ kobject_name(kobj));
+ return -ENOENT;
+ }
+
err = 0;
if (!sysfs_ns_type(dir_sd))
goto out;