[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/15] virtio-iommu: Remove useless !sdev check in virtio_iommu_pr
From: |
Michael S. Tsirkin |
Subject: |
[PULL 12/15] virtio-iommu: Remove useless !sdev check in virtio_iommu_probe() |
Date: |
Fri, 1 Dec 2023 12:15:39 -0500 |
From: Eric Auger <eric.auger@redhat.com>
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 <eric.auger@redhat.com>
Reported-by: Coverity (CID 1523901)
Message-Id: <20231109170715.259520-1-eric.auger@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio/virtio-iommu.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
index 89fb5767d1..9d463efc52 100644
--- a/hw/virtio/virtio-iommu.c
+++ b/hw/virtio/virtio-iommu.c
@@ -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) {
--
MST
- [PULL 05/15] hw/audio/hda-codec: fix multiplication overflow, (continued)
- [PULL 05/15] hw/audio/hda-codec: fix multiplication overflow, Michael S. Tsirkin, 2023/12/01
- [PULL 01/15] osdep: add getloadavg, Michael S. Tsirkin, 2023/12/01
- [PULL 07/15] virtio-snd: check AUD_register_card return value, Michael S. Tsirkin, 2023/12/01
- [PULL 15/15] vhost-user-scsi: free the inflight area when reset, Michael S. Tsirkin, 2023/12/01
- [PULL 02/15] netdev: set timeout depending on loadavg, Michael S. Tsirkin, 2023/12/01
- [PULL 03/15] tests/acpi/bios-tables-test: do not write new blobs unless there are changes, Michael S. Tsirkin, 2023/12/01
- [PULL 09/15] pcie_sriov: Remove g_new assertion, Michael S. Tsirkin, 2023/12/01
- [PULL 10/15] hw/acpi/erst: Do not ignore Error* in realize handler, Michael S. Tsirkin, 2023/12/01
- [PULL 12/15] virtio-iommu: Remove useless !sdev check in virtio_iommu_probe(),
Michael S. Tsirkin <=
- [PULL 08/15] virtio-sound: add realize() error cleanup path, Michael S. Tsirkin, 2023/12/01
- [PULL 14/15] vhost-user: fix the reconnect error, Michael S. Tsirkin, 2023/12/01
- [PULL 13/15] msix: unset PCIDevice::msix_vector_poll_notifier in rollback, Michael S. Tsirkin, 2023/12/01
- [PULL 06/15] hw/audio/hda-codec: reenable the audio mixer, Michael S. Tsirkin, 2023/12/01
- [PULL 11/15] hw/i386: fix short-circuit logic with non-optimizing builds, Michael S. Tsirkin, 2023/12/01
- Re: [PULL 00/15] virtio,pc,pci: fixes, Michael S. Tsirkin, 2023/12/02
- Re: [PULL 00/15] virtio,pc,pci: fixes, Stefan Hajnoczi, 2023/12/04