diff options
author | Mariusz Kozlowski <m.kozlowski@tuxland.pl> | 2007-01-02 13:41:10 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 10:37:13 -0800 |
commit | f75065367077bd3b77842a5aa523ecd05d33e82d (patch) | |
tree | 8c88382e578c2df7ff14ec005ae821dd4b36379e /fs/sysfs/bin.c | |
parent | d3fc373ac5061cab7a654502b942e7d00e77f733 (diff) | |
download | kernel_samsung_tuna-f75065367077bd3b77842a5aa523ecd05d33e82d.zip kernel_samsung_tuna-f75065367077bd3b77842a5aa523ecd05d33e82d.tar.gz kernel_samsung_tuna-f75065367077bd3b77842a5aa523ecd05d33e82d.tar.bz2 |
sysfs: kobject_put cleanup
This patch removes redundant argument checks for kobject_put().
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/bin.c')
-rw-r--r-- | fs/sysfs/bin.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c index 9ec1c85..d3b9f5f 100644 --- a/fs/sysfs/bin.c +++ b/fs/sysfs/bin.c @@ -147,7 +147,7 @@ static int open(struct inode * inode, struct file * file) Error: module_put(attr->attr.owner); Done: - if (error && kobj) + if (error) kobject_put(kobj); return error; } @@ -158,8 +158,7 @@ static int release(struct inode * inode, struct file * file) struct bin_attribute * attr = to_bin_attr(file->f_path.dentry); u8 * buffer = file->private_data; - if (kobj) - kobject_put(kobj); + kobject_put(kobj); module_put(attr->attr.owner); kfree(buffer); return 0; |