From: James Smart Date: Thu, 21 May 2015 17:55:19 +0000 (-0400) Subject: lpfc: Correct reference counting of rport X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7aafb6e75e0212b5aa5b1f79737e6e8de40b1132;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git lpfc: Correct reference counting of rport Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 72388a6ec5d5..e93705da81b4 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; }