tcm_qla2xxx: checking for NULL instead of IS_ERR()
Subsystems (3)
PATCH 1/1 tcm_qla2xxx: checking for NULL instead of IS_ERR()
target_fabric_configfs_init() never returns NULLs, only ERR_PTRs.
Signed-off-by Dan Carpenter <[email protected]>
drivers/scsi/qla2xxx/tcm_qla2xxx.c +2 -2
@@ -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; }/*
Quoted 10 lines · Dan Carpenter
target_fabric_configfs_init()never returns NULLs, onlyERR_PTRs.Signed-off-by Dan Carpenter <[email protected]>drivers/scsi/qla2xxx/tcm_qla2xxx.c +0
-0@@ -1885,9 +1885,9 @@ static int tcm_qla2xxx_register_configfs(void)* Register the top level struct config_item_type for NPIV with TCM core
drivers/scsi/qla2xxx/tcm_qla2xxx.c static int tcm_qla2xxx_register_configfs(void) · line 1893
Quoted 10 lines
drivers/scsi/qla2xxx/tcm_qla2xxx.c +2
-2*/ 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