Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46620
b: refs/heads/master
c: f750653
h: refs/heads/master
v: v3
  • Loading branch information
Mariusz Kozlowski authored and Greg Kroah-Hartman committed Feb 7, 2007
1 parent 6ea1491 commit 9426056
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d3fc373ac5061cab7a654502b942e7d00e77f733
refs/heads/master: f75065367077bd3b77842a5aa523ecd05d33e82d
5 changes: 2 additions & 3 deletions trunk/fs/sysfs/bin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions trunk/fs/sysfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ static int sysfs_open_file(struct inode *inode, struct file *file)
error = -EACCES;
module_put(attr->owner);
Done:
if (error && kobj)
if (error)
kobject_put(kobj);
return error;
}
Expand All @@ -375,8 +375,7 @@ static int sysfs_release(struct inode * inode, struct file * filp)

if (buffer)
remove_from_collection(buffer, inode);
if (kobj)
kobject_put(kobj);
kobject_put(kobj);
/* After this point, attr should not be accessed. */
module_put(owner);

Expand Down

0 comments on commit 9426056

Please sign in to comment.