]> git.karo-electronics.de Git - karo-tx-linux.git/commit
scsi: lpfc: prevent potential null pointer dereference
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Tue, 23 May 2017 15:09:28 +0000 (10:09 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 1 Jun 2017 02:45:15 +0000 (22:45 -0400)
commite6ef6a77f51e403a1400241b9d029ecaba45a834
tree969e9aeda7900fd8b1060a91590e80d40e81f0e6
parent7c9fdfb7000715df2d187df251d11e4850ce94c8
scsi: lpfc: prevent potential null pointer dereference

Null check at line 966: if (ndlp) {, implies that ndlp might be NULL.
Functions lpfc_nlp_set_state() and lpfc_issue_els_prli() dereference
pointer ndlp. Include these function calls inside the IF block that
tests pointer ndlp.

Addresses-Coverity-ID: 1401856
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_ct.c