aboutsummaryrefslogtreecommitdiff
path: root/scripts/bpf_doc.py
diff options
context:
space:
mode:
authorJustin Tee <[email protected]>2023-10-31 12:12:18 -0700
committerMartin K. Petersen <[email protected]>2023-11-15 09:52:57 -0500
commit1dec1311b9b6cc9c5fd26a77b936f542f03c51d1 (patch)
treeced91c03817141147be2725faadb68cdf7e68e26 /scripts/bpf_doc.py
parentf5779b529240b715f0e358489ad0ed933bf77c97 (diff)
scsi: lpfc: Fix list_entry null check warning in lpfc_cmpl_els_plogi()
Smatch called out a warning for null checking a ptr that is assigned by list_entry(). list_entry() does not return null and, if the list is empty, can return an invalid ptr. Thus, the !psrp check does not execute properly. drivers/scsi/lpfc/lpfc_els.c:2133 lpfc_cmpl_els_plogi() warn: list_entry() does not return NULL 'prsp' Replace list_entry() with list_get_first(), which does a list_empty() check before returning the first entry. Fixes: a3c3c0a806f1 ("scsi: lpfc: Validate ELS LS_ACC completion payload") Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/linux-scsi/[email protected]/ Signed-off-by: Justin Tee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions