diff options
author | Mariusz Kozlowski <m.kozlowski@tuxland.pl> | 2007-01-02 07:41:10 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 13:37:13 -0500 |
commit | f75065367077bd3b77842a5aa523ecd05d33e82d (patch) | |
tree | 8c88382e578c2df7ff14ec005ae821dd4b36379e /fs/sysfs/bin.c | |
parent | d3fc373ac5061cab7a654502b942e7d00e77f733 (diff) |
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 9ec1c8539a5d..d3b9f5f07db1 100644 --- a/fs/sysfs/bin.c +++ b/fs/sysfs/bin.c | |||
@@ -147,7 +147,7 @@ static int open(struct inode * inode, struct file * file) | |||
147 | Error: | 147 | Error: |
148 | module_put(attr->attr.owner); | 148 | module_put(attr->attr.owner); |
149 | Done: | 149 | Done: |
150 | if (error && kobj) | 150 | if (error) |
151 | kobject_put(kobj); | 151 | kobject_put(kobj); |
152 | return error; | 152 | return error; |
153 | } | 153 | } |
@@ -158,8 +158,7 @@ static int release(struct inode * inode, struct file * file) | |||
158 | struct bin_attribute * attr = to_bin_attr(file->f_path.dentry); | 158 | struct bin_attribute * attr = to_bin_attr(file->f_path.dentry); |
159 | u8 * buffer = file->private_data; | 159 | u8 * buffer = file->private_data; |
160 | 160 | ||
161 | if (kobj) | 161 | kobject_put(kobj); |
162 | kobject_put(kobj); | ||
163 | module_put(attr->attr.owner); | 162 | module_put(attr->attr.owner); |
164 | kfree(buffer); | 163 | kfree(buffer); |
165 | return 0; | 164 | return 0; |