From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>,
linux-driver@qlogic.com,
"James E.J. Bottomley" <JBottomley@parallels.com>,
linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] tcm_qla2xxx: checking for NULL instead of IS_ERR()
Date: Thu, 15 Mar 2012 23:13:05 +0000 [thread overview]
Message-ID: <1331853185.10203.129.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <20120313172119.GE31808@elgon.mountain>
On Tue, 2012-03-13 at 20:21 +0300, Dan Carpenter wrote:
> target_fabric_configfs_init() never returns NULLs, only ERR_PTRs.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> index dcbcedc..08cf507 100644
> --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> @@ -1885,9 +1885,9 @@ static int tcm_qla2xxx_register_configfs(void)
> * Register the top level struct config_item_type for NPIV with TCM core
> */
> npiv_fabric = target_fabric_configfs_init(THIS_MODULE, "qla2xxx_npiv");
> - if (!npiv_fabric) {
> + if (IS_ERR(npiv_fabric)) {
> pr_err("target_fabric_configfs_init() failed\n");
> - ret = -ENOMEM;
> + ret = PTR_ERR(npiv_fabric);
> goto out_fabric;
> }
> /*
Doh, missed this fix for the qla2xxx_npiv fabric_ops allocation..
Applied to lio-core and will get fixed up for-next-merge.
Thanks Dan!
--nab
prev parent reply other threads:[~2012-03-15 23:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-13 17:21 [patch] tcm_qla2xxx: checking for NULL instead of IS_ERR() Dan Carpenter
2012-03-15 23:13 ` Nicholas A. Bellinger [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=1331853185.10203.129.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=JBottomley@parallels.com \
--cc=andrew.vasquez@qlogic.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-driver@qlogic.com \
--cc=linux-scsi@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