提交 8168b9bb 编写于 作者: D Dan Carpenter 提交者: Richard Weinberger

UBI: block: Fix checking for NULL instead of IS_ERR()

We recently switched from allocating ->rq using blk_init_queue() to
use blk_mq_init_queue() so we need to update the error handling to
check for IS_ERR() instead of NULL.

Fixes: ff1f48ee ('UBI: Block: Add blk-mq support')
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 1440061b
......@@ -409,9 +409,9 @@ int ubiblock_create(struct ubi_volume_info *vi)
}
dev->rq = blk_mq_init_queue(&dev->tag_set);
if (!dev->rq) {
if (IS_ERR(dev->rq)) {
dev_err(disk_to_dev(gd), "blk_mq_init_queue failed");
ret = -ENODEV;
ret = PTR_ERR(dev->rq);
goto out_free_tags;
}
blk_queue_max_segments(dev->rq, UBI_MAX_SG_COUNT);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册