diff options
author | Tang Junhui <tang.junhui@zte.com.cn> | 2018-01-08 12:21:22 -0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-01-08 13:29:00 -0700 |
commit | 539d39eb27083405b82b9e604e88af01a9a46c63 (patch) | |
tree | 5addc3281f3247dd87e93731f00584a8529e63b7 /drivers/md/bcache/debug.c | |
parent | 4eca1cb28d8b0574ca4f1f48e9331c5f852d43b9 (diff) | |
download | linux-stable-539d39eb27083405b82b9e604e88af01a9a46c63.tar.gz linux-stable-539d39eb27083405b82b9e604e88af01a9a46c63.tar.bz2 linux-stable-539d39eb27083405b82b9e604e88af01a9a46c63.zip |
bcache: fix wrong return value in bch_debug_init()
in bch_debug_init(), ret is always 0, and the return value is useless,
change it to return 0 if be success after calling debugfs_create_dir(),
else return a non-zero value.
Signed-off-by: Tang Junhui <tang.junhui@zte.com.cn>
Reviewed-by: Michael Lyle <mlyle@lyle.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/debug.c')
-rw-r--r-- | drivers/md/bcache/debug.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/bcache/debug.c b/drivers/md/bcache/debug.c index 879ab21074c6..af89408befe8 100644 --- a/drivers/md/bcache/debug.c +++ b/drivers/md/bcache/debug.c @@ -251,8 +251,7 @@ void bch_debug_exit(void) int __init bch_debug_init(struct kobject *kobj) { - int ret = 0; - debug = debugfs_create_dir("bcache", NULL); - return ret; + + return IS_ERR_OR_NULL(debug); } |