From: James Smart Date: Wed, 21 Jun 2017 17:51:23 +0000 (-0700) Subject: scsi: lpfc: fix refcount error on node list X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cb45e5295a21eba23edc64839cd60122805f37f3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git scsi: lpfc: fix refcount error on node list A change in remote port removal introduced a spurious put which can cause a premature structure teardown. The affects were most notable when the driver attempted to unload as a null pointer would be hit. Fix by removing the unnecessary put. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 7e73fdc154f7..491aa95eb0f6 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -2805,13 +2805,6 @@ lpfc_cleanup(struct lpfc_vport *vport) lpfc_disc_state_machine(vport, ndlp, NULL, NLP_EVT_DEVICE_RECOVERY); - if (ndlp->nlp_fc4_type & NLP_FC4_NVME) { - /* Remove the NVME transport reference now and - * continue to remove the node. - */ - lpfc_nlp_put(ndlp); - } - lpfc_disc_state_machine(vport, ndlp, NULL, NLP_EVT_DEVICE_RM); }