]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: ufs: core: Remove an unnecessary NULL pointer check
authorBart Van Assche <bvanassche@acm.org>
Tue, 11 Nov 2025 18:47:59 +0000 (10:47 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 13 Nov 2025 01:58:28 +0000 (20:58 -0500)
commit18987143d4b1945a1bfcb3963ae1961ca29b27dd
treec5c5131d684ce6264eeff40c4739e6c2087eae48
parent1028258914f608023279725d1756abf5b974e6d6
scsi: ufs: core: Remove an unnecessary NULL pointer check

The !payload check tests the address of a member of a data structure. We
know that the start address of this data structure (job) is not NULL
since the 'job' pointer has already been dereferenced. Hence, the
!payload check is superfluous. Remove this test. This was reported by
the CodeSonar static analyzer.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20251111184802.125111-1-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufs_bsg.c