]> git.baikalelectronics.ru Git - kernel.git/commit
ublk_drv: fix an IS_ERR() vs NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 18 Jul 2022 11:14:09 +0000 (14:14 +0300)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Jul 2022 19:11:11 +0000 (13:11 -0600)
commit1b778f7fecc95fc51abc0711d26300b65e9c4669
tree6c4e5b0991e2d5f192a538ea2d3a4b9a194455be
parent26feecc7f5af1b2b3f3f5d4c48fc905564640ea4
ublk_drv: fix an IS_ERR() vs NULL check

The blk_mq_alloc_disk_for_queue() doesn't return error pointers, it
returns NULL on error.

Fixes: e40cb4715158 ("ublk_drv: fix request queue leak")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/YtVAgedTsQVK1oTM@kili
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c