Commit a56489d4 authored by Florian Schmaus's avatar Florian Schmaus Committed by Jens Axboe

bcache: do not assign in if condition register_bcache()

Fixes an error condition reported by checkpatch.pl which is caused by
assigning a variable in an if condition.
Signed-off-by: default avatarFlorian Schmaus <flo@geekplace.eu>
Signed-off-by: default avatarColy Li <colyli@suse.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 94f71c16
...@@ -2165,8 +2165,12 @@ static ssize_t register_bcache(struct kobject *k, struct kobj_attribute *attr, ...@@ -2165,8 +2165,12 @@ static ssize_t register_bcache(struct kobject *k, struct kobj_attribute *attr,
if (!try_module_get(THIS_MODULE)) if (!try_module_get(THIS_MODULE))
return -EBUSY; return -EBUSY;
if (!(path = kstrndup(buffer, size, GFP_KERNEL)) || path = kstrndup(buffer, size, GFP_KERNEL);
!(sb = kmalloc(sizeof(struct cache_sb), GFP_KERNEL))) if (!path)
goto err;
sb = kmalloc(sizeof(struct cache_sb), GFP_KERNEL);
if (!sb)
goto err; goto err;
err = "failed to open device"; err = "failed to open device";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment