Skip to content
Commit 1e7dddb2 authored by Colin Ian King's avatar Colin Ian King Committed by Martin K. Petersen
Browse files

scsi: lpfc: Fix pointer defereference before it is null checked issue

There is a null check on pointer lpfc_cmd after the pointer has been
dereferenced when pointers rdata and ndlp are initialized at the start of
the function. Fix this by only assigning rdata and ndlp after the pointer
lpfc_cmd has been null checked.

Link: https://lore.kernel.org/r/20201118131345.460631-1-colin.king@canonical.com


Fixes: 96e209be ("scsi: lpfc: Convert SCSI I/O completions to SLI-3 and SLI-4 handlers")
Reviewed-by: default avatarJames Smart <james.smart@broadcom.com>
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Addresses-Coverity: ("Dereference before null check")
parent e4af87b7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment