Commit 083f9693 authored by Dan Carpenter's avatar Dan Carpenter Committed by openeuler-sync-bot
Browse files

blk-mq: fix an IS_ERR() vs NULL bug

mainline inclusion
from mainline-v5.14-rc1
commit 52d7e288
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I81XCK

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=52d7e288444906aa5c99888e80a9cc1a1423ed92



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

The __blk_mq_alloc_disk() function doesn't return NULLs it returns
error pointers.

Fixes: b461dfc4 ("blk-mq: add the blk_mq_alloc_disk APIs")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/YMyjci35WBqrtqG+@mwanda


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarZhong Jinghua <zhongjinghua@huawei.com>
Signed-off-by: default avatarLi Nan <linan122@huawei.com>
(cherry picked from commit 5b212263)
parent 887516b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment