Commit f85cd1a9 authored by Dan Carpenter's avatar Dan Carpenter Committed by Zheng Zengkai
Browse files

null_blk: fix ida error handling in null_add_dev()

stable inclusion
from stable-v5.10.137
commit 7a4b46784a7b27b5ceb28bc816ea188d6d035dfa
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7a4b46784a7b27b5ceb28bc816ea188d6d035dfa



--------------------------------

[ Upstream commit ee452a8d ]

There needs to be some error checking if ida_simple_get() fails.
Also call ida_free() if there are errors later.

Fixes: 94bc02e3 ("nullb: use ida to manage index")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YtEhXsr6vJeoiYhd@kili


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent 77daec38
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment