|
|
@@ -2482,15 +2482,15 @@ lpfc_nvme_create_localport(struct lpfc_vport *vport)
|
|
|
if (!cstat)
|
|
|
return -ENOMEM;
|
|
|
|
|
|
+ if (!IS_ENABLED(CONFIG_NVME_FC))
|
|
|
+ return ret;
|
|
|
+
|
|
|
/* localport is allocated from the stack, but the registration
|
|
|
* call allocates heap memory as well as the private area.
|
|
|
*/
|
|
|
-#if (IS_ENABLED(CONFIG_NVME_FC))
|
|
|
+
|
|
|
ret = nvme_fc_register_localport(&nfcp_info, &lpfc_nvme_template,
|
|
|
&vport->phba->pcidev->dev, &localport);
|
|
|
-#else
|
|
|
- ret = -ENOMEM;
|
|
|
-#endif
|
|
|
if (!ret) {
|
|
|
lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME | LOG_NVME_DISC,
|
|
|
"6005 Successfully registered local "
|