]> git.baikalelectronics.ru Git - kernel.git/commit
null_blk: fix ida error handling in null_add_dev()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 15 Jul 2022 08:12:14 +0000 (11:12 +0300)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:22:41 +0000 (17:22 -0600)
commitdddd4a1abd410d397a4eb517b64cd30e57d1a901
tree52f1d0ccc8a57447d922c0ef04582d27330a1f5b
parent8f3c5b889490613957d25d4a73bd8f939c660c16
null_blk: fix ida error handling in null_add_dev()

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

Fixes: a4f42ad79f7f ("nullb: use ida to manage index")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YtEhXsr6vJeoiYhd@kili
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk/main.c