diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-02 20:24:44 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-02 20:24:44 +0100 |
commit | bd1d462e13b278fc57752d0b9b15040e60e561a0 (patch) | |
tree | e2fdf1c18a93aab02830bcb8a5db8cdddfbb63a8 /fs/sysfs | |
parent | sysfs: Update the name hash when renaming sysfs entries (diff) | |
parent | Linux 3.3-rc2 (diff) | |
download | linux-bd1d462e13b278fc57752d0b9b15040e60e561a0.tar.xz linux-bd1d462e13b278fc57752d0b9b15040e60e561a0.zip |
Merge 3.3-rc2 into the driver-core-next branch.
This was done to resolve a merge and build problem with the
drivers/acpi/processor_driver.c file.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs')
-rw-r--r-- | fs/sysfs/file.c | 6 | ||||
-rw-r--r-- | fs/sysfs/inode.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 62f4fb37789e..00012e31829d 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; diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 0ac3e1c1a7d8..4291fd1617ab 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -315,8 +315,11 @@ int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const void *ns, const cha struct sysfs_addrm_cxt acxt; struct sysfs_dirent *sd; - if (!dir_sd) + if (!dir_sd) { + WARN(1, KERN_WARNING "sysfs: can not remove '%s', no directory\n", + name); return -ENOENT; + } sysfs_addrm_start(&acxt, dir_sd); |