]> git.karo-electronics.de Git - karo-tx-linux.git/commit
scsi: lpfc: sanity check hrq is null before dereferencing it
authorJames Smart <jsmart2021@gmail.com>
Sat, 4 Mar 2017 17:30:22 +0000 (09:30 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 7 Mar 2017 04:04:22 +0000 (23:04 -0500)
commit7aabe84b8a1bb7c3f75fb6a23dc96f8999bdcc8f
treec33a898cf065f3ed2c6d72b0c836c0416caeea6d
parent70e5afd57d6d97d69bf5fd0187c2bb5a79990504
scsi: lpfc: sanity check hrq is null before dereferencing it

From: Colin Ian King <colin.king@canonical.com>

The sanity check for hrq should be moved to before the deference
of hrq to ensure we don't perform a null pointer deference.

Detected by CoverityScan, CID#1411650 ("Dereference before null check")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c