virtio-iommu: Remove useless !sdev check in virtio_iommu_probe()
PATCH 1/1 virtio-iommu: Remove useless !sdev check in virtio_iommu_probe()
The code already checks iommu_mr is not NULL so there is no need to check container_of() is not NULL. Remove the check.
Fixes CID 1523901
Fixes 09b4c3d6a2 ("virtio-iommu: Record whether a probe request has
been issued")
Signed-off-by Eric Auger <[email protected]>
Reported-by Coverity (CID 1523901)
--- hw/virtio/virtio-iommu.c | 3 --- 1 file changed, 3 deletions(-)
hw/virtio/virtio-iommu.c +0 -3
@@ -698,9 +698,6 @@ static int virtio_iommu_probe(VirtIOIOMMU *s, } sdev =container_of (iommu_mr, IOMMUDevice, iommu_mr); -if (!sdev) { -return -EINVAL ; - } count =virtio_iommu_fill_resv_mem_prop (sdev, ep_id, buf, free);if (count <0 ) {
Signature · 1 line
2.41.0
Quoted 9 lines · Eric Auger
The code already checks
iommu_mris not NULL so there is no need to checkcontainer_of()is not NULL. Remove the check.Fixes CID 1523901Fixes 09b4c3d6a2 ("virtio-iommu: Record whether a probe request hasbeen issued")
Signed-off-by Eric Auger <[email protected]>Reported-by Coverity (CID 1523901)
Reviewed-by Peter Maydell <[email protected]>
thanks
-- PMM