Skip to content
Commit d55f7cb2 authored by Chao Yu's avatar Chao Yu Committed by Jens Axboe
Browse files

bcache: fix error info in register_bcache()



In register_bcache(), there are several cases we didn't set
correct error info (return value and/or error message):
- if kzalloc() fails, it needs to return ENOMEM and print
"cannot allocate memory";
- if register_cache() fails, it's better to propagate its
return value rather than using default EINVAL.

Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarColy Li <colyli@suse.de>
Link: https://lore.kernel.org/r/20211020143812.6403-4-colyli@suse.de


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 0a2b3e36
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment