summaryrefslogtreecommitdiff
path: root/arch/powerpc/Kconfig
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2023-06-08 10:58:49 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2023-06-19 17:37:13 +1000
commitf4f913c980bc6abe0ccfe88fe3909c125afe4a2d (patch)
tree24d11b7db97b8973617b9d6ebf7f5774febd497c /arch/powerpc/Kconfig
parenta16e472c3546ba0b8a4be265c008d02ef6aed899 (diff)
powerpc/powernv/sriov: perform null check on iov before dereferencing iov
Currently pointer iov is being dereferenced before the null check of iov which can lead to null pointer dereference errors. Fix this by moving the iov null check before the dereferencing. Detected using cppcheck static analysis: linux/arch/powerpc/platforms/powernv/pci-sriov.c:597:12: warning: Either the condition '!iov' is redundant or there is possible null pointer dereference: iov. [nullPointerRedundantCheck] num_vfs = iov->num_vfs; ^ Fixes: 052da31d45fc ("powerpc/powernv/sriov: De-indent setup and teardown") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230608095849.1147969-1-colin.i.king@gmail.com
Diffstat (limited to 'arch/powerpc/Kconfig')
0 files changed, 0 insertions, 0 deletions