]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
iommu static analysis cleanup
authorrlibby <rlibby@FreeBSD.org>
Thu, 16 May 2019 04:24:08 +0000 (04:24 +0000)
committerrlibby <rlibby@FreeBSD.org>
Thu, 16 May 2019 04:24:08 +0000 (04:24 +0000)
commit48e52ae146ac32c9c5991e914241cf24a355c0c3
tree3f9818b97ea5de42ef98a466531934a8bdb7f399
parent5ab4684305e226d9c6508f3ee12e8df41c9f6adb
iommu static analysis cleanup

A static analyzer complained about a couple instances of checking a
variable against NULL after already having dereferenced it.
 - dmar_gas_alloc_region: remove the tautological NULL checks
 - dmar_release_resources / dmar_fini_fault_log: don't deref unit->regs
   unless initialized.

And while here, fix an inverted initialization check in dmar_fini_qi.

Reviewed by: kib
Sponsored by: Dell EMC Isilon
Differential revision: https://reviews.freebsd.org/D20263
sys/x86/iommu/intel_fault.c
sys/x86/iommu/intel_gas.c
sys/x86/iommu/intel_qi.c