From: Dan Carpenter <dan.carpenter@oracle.com>
To: Andrew Vasquez <andrew.vasquez@qlogic.com>,
Nicholas Bellinger <nab@linux-iscsi.org>
Cc: linux-driver@qlogic.com,
"James E.J. Bottomley" <JBottomley@parallels.com>,
linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] tcm_qla2xxx: checking for NULL instead of IS_ERR()
Date: Tue, 13 Mar 2012 17:21:19 +0000 [thread overview]
Message-ID: <20120313172119.GE31808@elgon.mountain> (raw)
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;
}
/*
next reply other threads:[~2012-03-13 17:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-13 17:21 Dan Carpenter [this message]
2012-03-15 23:13 ` [patch] tcm_qla2xxx: checking for NULL instead of IS_ERR() 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=20120313172119.GE31808@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=JBottomley@parallels.com \
--cc=andrew.vasquez@qlogic.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-driver@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.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