From: Al Viro <viro@ZenIV.linux.org.uk>
To: Jens Axboe <axboe@fb.com>
Cc: Ming Lei <ming.lei@canonical.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: fix checking return value of blk_mq_init_queue
Date: Fri, 2 Jan 2015 17:34:47 +0000 [thread overview]
Message-ID: <20150102173447.GS22149@ZenIV.linux.org.uk> (raw)
In-Reply-To: <54A6BEE7.3020601@fb.com>
On Fri, Jan 02, 2015 at 08:53:11AM -0700, Jens Axboe wrote:
> On 01/02/2015 07:25 AM, Ming Lei wrote:
> >Check IS_ERR_OR_NULL(return value) instead of just return value.
>
> Thanks Ming, applied.
Umm... Looking at the callers, I'd suggest making it _never_ return NULL -
it's always treates as ERR_PTR(-ENOMEM) anyway. Then the checks would be
just IS_ERR(...).
IS_ERR_OR_NULL() is very often a sign of lousy calling conventions and
this case is no exception...
next prev parent reply other threads:[~2015-01-02 17:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-02 14:25 [PATCH] block: fix checking return value of blk_mq_init_queue Ming Lei
2015-01-02 15:53 ` Jens Axboe
2015-01-02 17:34 ` Al Viro [this message]
2015-01-02 17:40 ` Jens Axboe
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=20150102173447.GS22149@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=axboe@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@canonical.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.