diff mbox

[v2,04/15] lpfc: Correct reference counting of rport

Message ID 555e1c07.dPcUVpmrrj6KDZ3q%james.smart@avagotech.com (mailing list archive)
State New, archived
Headers show

Commit Message

James Smart May 21, 2015, 5:55 p.m. UTC
Correct reference counting of rport

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
---
 drivers/scsi/lpfc/lpfc_hbadisc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 72388a6..e93705d 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -161,7 +161,8 @@  lpfc_dev_loss_tmo_callbk(struct fc_rport *rport)
 			ndlp->rport = NULL;
 			if (put_node)
 				lpfc_nlp_put(ndlp);
-			put_device(&rport->dev);
+			if (put_rport)
+				put_device(&rport->dev);
 			return;
 		}