X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fsysfs%2Ffile.c;h=779789af6e9009055b6bfc7bd45c804b5ec12155;hb=ac11752c47b979ab5119806643aa67bcaa2641b9;hp=d4e6080b4b2053fae16fd451d01b6b20f813906f;hpb=42a0ddcd484d0470d4c1b114ffb6be1d35f8ac6b;p=pandora-kernel.git diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index d4e6080b4b20..779789af6e90 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;