diff options
Diffstat (limited to 'fs/sysfs/bin.c')
| -rw-r--r-- | fs/sysfs/bin.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c index c16a93c353c0..98022e41cda1 100644 --- a/fs/sysfs/bin.c +++ b/fs/sysfs/bin.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
| 12 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
| 13 | #include <linux/kernel.h> | ||
| 13 | #include <linux/kobject.h> | 14 | #include <linux/kobject.h> |
| 14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
| 15 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
| @@ -176,7 +177,6 @@ const struct file_operations bin_fops = { | |||
| 176 | * sysfs_create_bin_file - create binary file for object. | 177 | * sysfs_create_bin_file - create binary file for object. |
| 177 | * @kobj: object. | 178 | * @kobj: object. |
| 178 | * @attr: attribute descriptor. | 179 | * @attr: attribute descriptor. |
| 179 | * | ||
| 180 | */ | 180 | */ |
| 181 | 181 | ||
| 182 | int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr) | 182 | int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr) |
| @@ -191,13 +191,16 @@ int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr) | |||
| 191 | * sysfs_remove_bin_file - remove binary file for object. | 191 | * sysfs_remove_bin_file - remove binary file for object. |
| 192 | * @kobj: object. | 192 | * @kobj: object. |
| 193 | * @attr: attribute descriptor. | 193 | * @attr: attribute descriptor. |
| 194 | * | ||
| 195 | */ | 194 | */ |
| 196 | 195 | ||
| 197 | int sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr) | 196 | void sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr) |
| 198 | { | 197 | { |
| 199 | sysfs_hash_and_remove(kobj->dentry,attr->attr.name); | 198 | if (sysfs_hash_and_remove(kobj->dentry, attr->attr.name) < 0) { |
| 200 | return 0; | 199 | printk(KERN_ERR "%s: " |
| 200 | "bad dentry or inode or no such file: \"%s\"\n", | ||
| 201 | __FUNCTION__, attr->attr.name); | ||
| 202 | dump_stack(); | ||
| 203 | } | ||
| 201 | } | 204 | } |
| 202 | 205 | ||
| 203 | EXPORT_SYMBOL_GPL(sysfs_create_bin_file); | 206 | EXPORT_SYMBOL_GPL(sysfs_create_bin_file); |
