summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-02-05 08:38:19 +0100
committerRichard Weinberger <richard@nod.at>2015-02-12 23:33:32 +0100
commit8168b9bba6a88fe8a81be5b5f0937faeb3f6775d (patch)
tree350b4b62141da21c67318bcc92372b8e4997aa39 /drivers
parentUBI: block: Continue creating ubiblocks after an initialization error (diff)
downloadlinux-8168b9bba6a88fe8a81be5b5f0937faeb3f6775d.tar.xz
linux-8168b9bba6a88fe8a81be5b5f0937faeb3f6775d.zip
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: ff1f48ee3bb3 ('UBI: Block: Add blk-mq support') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/ubi/block.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c
index d82c63ae7c21..db2c05b6fe7f 100644
--- a/drivers/mtd/ubi/block.c
+++ b/drivers/mtd/ubi/block.c
@@ -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);