Message ID | 1514201980-30595-1-git-send-email-tang.junhui@zte.com.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 12/25/2017 03:39 AM, tang.junhui@zte.com.cn wrote: > From: Tang Junhui <tang.junhui@zte.com.cn> > > 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> LGTM, applied to my staging branch. (Still line ending issues but easily fixed with checkpatch.pl --fix) Thanks, Mike
diff --git a/drivers/md/bcache/debug.c b/drivers/md/bcache/debug.c index c7a02c4..2bb0b28 --- 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); }