From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] sbp-target: checking for NULL instead of IS_ERR()
Date: Wed, 18 Apr 2012 07:11:56 +0000 [thread overview]
Message-ID: <1334733116.15333.0.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <20120417062946.GB26756@elgon.mountain>
On Tue, 2012-04-17 at 09:29 +0300, Dan Carpenter wrote:
> target_fabric_configfs_init() never returns NULL, it only returns
> ERR_PTRs.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c
> index 37c6098..d605971 100644
> --- a/drivers/target/sbp/sbp_target.c
> +++ b/drivers/target/sbp/sbp_target.c
> @@ -2559,9 +2559,9 @@ static int sbp_register_configfs(void)
> int ret;
>
> fabric = target_fabric_configfs_init(THIS_MODULE, "sbp");
> - if (!fabric) {
> + if (IS_ERR(fabric)) {
> pr_err("target_fabric_configfs_init() failed\n");
> - return -ENOMEM;
> + return PTR_ERR(fabric);
> }
>
> fabric->tf_ops = sbp_ops;
> --
Applied to lio-core. Thanks DanC!
--nab
next prev parent reply other threads:[~2012-04-18 7:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-17 6:29 [patch] sbp-target: checking for NULL instead of IS_ERR() Dan Carpenter
2012-04-17 7:59 ` Chris Boot
2012-04-18 7:11 ` Nicholas A. Bellinger [this message]
2016-03-02 10:09 ` [patch] sbp-target: checking for NULL instead of IS_ERR Dan Carpenter
2016-03-05 7:33 ` Nicholas A. Bellinger
2016-03-05 8:45 ` Chris Boot
2016-03-05 9:33 ` Nicholas A. Bellinger
2016-03-10 20:56 ` Chris Boot
2016-03-10 21:52 ` Chris Boot
2016-03-10 22:58 ` Chris Boot
2016-03-11 4:33 ` Nicholas A. Bellinger
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=1334733116.15333.0.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=kernel-janitors@vger.kernel.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