Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77096
b: refs/heads/master
c: 11f24fb
h: refs/heads/master
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed Jan 23, 2008
1 parent faeb050 commit 0870833
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: d0ad3bc97c06fba5d37b4ca03c03b7eeeda39c47
refs/heads/master: 11f24fbdf511cf588c3a18e3208ee02d85db0020
11 changes: 9 additions & 2 deletions trunk/fs/sysfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,11 @@ int sysfs_add_file_to_group(struct kobject *kobj,
struct sysfs_dirent *dir_sd;
int error;

dir_sd = sysfs_get_dirent(kobj->sd, group);
if (group)
dir_sd = sysfs_get_dirent(kobj->sd, group);
else
dir_sd = sysfs_get(kobj->sd);

if (!dir_sd)
return -ENOENT;

Expand Down Expand Up @@ -656,7 +660,10 @@ void sysfs_remove_file_from_group(struct kobject *kobj,
{
struct sysfs_dirent *dir_sd;

dir_sd = sysfs_get_dirent(kobj->sd, group);
if (group)
dir_sd = sysfs_get_dirent(kobj->sd, group);
else
dir_sd = sysfs_get(kobj->sd);
if (dir_sd) {
sysfs_hash_and_remove(dir_sd, attr->name);
sysfs_put(dir_sd);
Expand Down

0 comments on commit 0870833

Please sign in to comment.