summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/inode.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-08-02 21:38:03 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 14:51:04 -0700
commit990e53f880be9ff93072b4cce590ec2826cee0b6 (patch)
treefaa7cbedef2f1d9b8d27832ccbaa28e508d134e8 /fs/sysfs/inode.c
parent23dc279950a056c33a14d09cf759f5173d41abd9 (diff)
downloadtalos-op-linux-990e53f880be9ff93072b4cce590ec2826cee0b6.tar.gz
talos-op-linux-990e53f880be9ff93072b4cce590ec2826cee0b6.zip
sysfs: make sysfs_addrm_finish() return void
With the previous sysfs_add_one() update, there is only one user of the return value of sysfs_addrm_finish() and the user can switch to testing @sd easily. Make sysfs_addrm_finish() return void for cleaner semantics as suggested by Satyam Sharma. This patch doesn't introduce any noticeable behavior change. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Satyam Sharma <satyam.sharma@gmail.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/inode.c')
-rw-r--r--fs/sysfs/inode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index efb4062fe099..e22db6cd4df7 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -200,7 +200,10 @@ int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const char *name)
if (sd)
sysfs_remove_one(&acxt, sd);
- if (sysfs_addrm_finish(&acxt))
+ sysfs_addrm_finish(&acxt);
+
+ if (sd)
return 0;
- return -ENOENT;
+ else
+ return -ENOENT;
}
OpenPOWER on IntegriCloud