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/file.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/file.c')
-rw-r--r-- | fs/sysfs/file.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index cba4c1c7383c..46618f81ae48 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c | |||
@@ -361,7 +361,7 @@ static int sysfs_open_file(struct inode *inode, struct file *file) | |||
361 | error = -EACCES; | 361 | error = -EACCES; |
362 | module_put(attr->owner); | 362 | module_put(attr->owner); |
363 | Done: | 363 | Done: |
364 | if (error && kobj) | 364 | if (error) |
365 | kobject_put(kobj); | 365 | kobject_put(kobj); |
366 | return error; | 366 | return error; |
367 | } | 367 | } |
@@ -375,8 +375,7 @@ static int sysfs_release(struct inode * inode, struct file * filp) | |||
375 | 375 | ||
376 | if (buffer) | 376 | if (buffer) |
377 | remove_from_collection(buffer, inode); | 377 | remove_from_collection(buffer, inode); |
378 | if (kobj) | 378 | kobject_put(kobj); |
379 | kobject_put(kobj); | ||
380 | /* After this point, attr should not be accessed. */ | 379 | /* After this point, attr should not be accessed. */ |
381 | module_put(owner); | 380 | module_put(owner); |
382 | 381 | ||