* [patch] UBI: block: checking for NULL instead of IS_ERR()
@ 2015-02-05 7:38 Dan Carpenter
2015-02-12 22:35 ` Richard Weinberger
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-02-05 7:38 UTC (permalink / raw)
To: Artem Bityutskiy, Richard Weinberger
Cc: linux-mtd, kernel-janitors, Brian Norris, David Woodhouse
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>
diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c
index 995e61c..d0a9349 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);
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [patch] UBI: block: checking for NULL instead of IS_ERR()
2015-02-05 7:38 [patch] UBI: block: checking for NULL instead of IS_ERR() Dan Carpenter
@ 2015-02-12 22:35 ` Richard Weinberger
0 siblings, 0 replies; 2+ messages in thread
From: Richard Weinberger @ 2015-02-12 22:35 UTC (permalink / raw)
To: Dan Carpenter, Artem Bityutskiy
Cc: linux-mtd, kernel-janitors, Brian Norris, David Woodhouse
Am 05.02.2015 um 08:38 schrieb Dan Carpenter:
> 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>
>
> diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c
> index 995e61c..d0a9349 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);
Applied. Thanks Dan!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-12 22:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-05 7:38 [patch] UBI: block: checking for NULL instead of IS_ERR() Dan Carpenter
2015-02-12 22:35 ` Richard Weinberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox