* [patch] tcm_qla2xxx: checking for NULL instead of IS_ERR()
@ 2012-03-13 17:21 Dan Carpenter
2012-03-15 23:13 ` Nicholas A. Bellinger
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-03-13 17:21 UTC (permalink / raw)
To: Andrew Vasquez, Nicholas Bellinger
Cc: linux-driver, James E.J. Bottomley, linux-scsi, kernel-janitors
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;
}
/*
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [patch] tcm_qla2xxx: checking for NULL instead of IS_ERR()
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
0 siblings, 0 replies; 2+ messages in thread
From: Nicholas A. Bellinger @ 2012-03-15 23:13 UTC (permalink / raw)
To: Dan Carpenter
Cc: Andrew Vasquez, linux-driver, James E.J. Bottomley, linux-scsi,
kernel-janitors
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-15 23:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox