aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorFlorian Schmaus <flo@geekplace.eu>2018-07-26 12:17:39 +0800
committerJens Axboe <axboe@kernel.dk>2018-07-27 09:15:46 -0600
commit16c1fdf4cfd6c0091e59b93ec2cb7e99973f8244 (patch)
treea7ff9e290aedbf5fc73a78dfcd25f9a9626703be /drivers/md
parentbcache: free heap cache_set->flush_btree in bch_journal_free (diff)
downloadlinux-dev-16c1fdf4cfd6c0091e59b93ec2cb7e99973f8244.tar.xz
linux-dev-16c1fdf4cfd6c0091e59b93ec2cb7e99973f8244.zip
bcache: do not assign in if condition in bcache_init()
Fixes an error condition reported by checkpatch.pl which is caused by assigning a variable in an if condition. Signed-off-by: Florian Schmaus <flo@geekplace.eu> Signed-off-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/bcache/super.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index 093b3789ce05..a852018964ad 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -2330,9 +2330,15 @@ static int __init bcache_init(void)
return bcache_major;
}
- if (!(bcache_wq = alloc_workqueue("bcache", WQ_MEM_RECLAIM, 0)) ||
- !(bcache_kobj = kobject_create_and_add("bcache", fs_kobj)) ||
- bch_request_init() ||
+ bcache_wq = alloc_workqueue("bcache", WQ_MEM_RECLAIM, 0);
+ if (!bcache_wq)
+ goto err;
+
+ bcache_kobj = kobject_create_and_add("bcache", fs_kobj);
+ if (!bcache_kobj)
+ goto err;
+
+ if (bch_request_init() ||
bch_debug_init(bcache_kobj) || closure_debug_init() ||
sysfs_create_files(bcache_kobj, files))
goto err;