OSDN Git Service

scsi: qla4xxx: fix a potential NULL pointer dereference
authorKangjie Lu <kjlu@umn.edu>
Thu, 14 Mar 2019 06:30:59 +0000 (01:30 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 May 2019 07:20:20 +0000 (09:20 +0200)
commit4135e588274e7b8ddeea95683f9d70f19d019f2e
tree0321ac6a6cabfded55f7fc773634a7bff0c1af3d
parenta2b302e4f2fb40bdcda3c7c70dae9a27974dbd49
scsi: qla4xxx: fix a potential NULL pointer dereference

[ Upstream commit fba1bdd2a9a93f3e2181ec1936a3c2f6b37e7ed6 ]

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>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
drivers/scsi/qla4xxx/ql4_os.c