From: Richard Weinberger <richard@nod.at>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Artem Bityutskiy <dedekind1@gmail.com>
Cc: linux-mtd@lists.infradead.org, kernel-janitors@vger.kernel.org,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [patch] UBI: block: checking for NULL instead of IS_ERR()
Date: Thu, 12 Feb 2015 23:35:01 +0100 [thread overview]
Message-ID: <54DD2A95.3090702@nod.at> (raw)
In-Reply-To: <20150205073819.GB27855@mwanda>
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!
prev parent reply other threads:[~2015-02-12 22:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54DD2A95.3090702@nod.at \
--to=richard@nod.at \
--cc=computersforpeace@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox