Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -2165,8 +2165,12 @@ static ssize_t register_bcache(struct kobject *k, struct kobj_attribute *attr,
	if (!try_module_get(THIS_MODULE))
		return -EBUSY;

	if (!(path = kstrndup(buffer, size, GFP_KERNEL)) ||
	    !(sb = kmalloc(sizeof(struct cache_sb), GFP_KERNEL)))
	path = kstrndup(buffer, size, GFP_KERNEL);
	if (!path)
		goto err;

	sb = kmalloc(sizeof(struct cache_sb), GFP_KERNEL);
	if (!sb)
		goto err;

	err = "failed to open device";