scsi: qla4xxx: fix a potential NULL pointer dereference
authorKangjie Lu <kjlu@umn.edu>
Thu, 14 Mar 2019 06:30:59 +0000 (01:30 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 26 Mar 2019 02:24:30 +0000 (22:24 -0400)
commitfba1bdd2a9a93f3e2181ec1936a3c2f6b37e7ed6
tree5f398a1ac62f492a70aa3a0cff75cfbc6ac591c1
parentb6554cfe09e1f610aed7d57164ab7760be57acd9
scsi: qla4xxx: fix a potential NULL pointer dereference

In case iscsi_lookup_endpoint fails, the fix returns -EINVAL to avoid NULL
pointer dereference.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Acked-by: Manish Rangankar <mrangankar@marvell.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla4xxx/ql4_os.c