]> git.proxmox.com Git - mirror_qemu.git/commitdiff
virtio-iommu: Fix coverity issue in virtio_iommu_handle_command()
authorEric Auger <eric.auger@redhat.com>
Mon, 13 Jul 2020 13:36:08 +0000 (14:36 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 13 Jul 2020 13:36:08 +0000 (14:36 +0100)
Coverity points out (CID 1430180) that the new case is missing
break or a /* fallthrough */ comment. Break is the right thing to
do as in that case, tail is not used.

Fixes 1733eebb9e ("virtio-iommu: Implement RESV_MEM probe request")
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20200708160147.18426-1-eric.auger@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/virtio/virtio-iommu.c

index b39e836181e5208fd440ee848c94d78f5a6b4636..5d56865e5699e331a07856328731fcca305f0a90 100644 (file)
@@ -534,6 +534,7 @@ static void virtio_iommu_handle_command(VirtIODevice *vdev, VirtQueue *vq)
             ptail = (struct virtio_iommu_req_tail *)
                         (buf + s->config.probe_size);
             ptail->status = virtio_iommu_handle_probe(s, iov, iov_cnt, buf);
+            break;
         }
         default:
             tail.status = VIRTIO_IOMMU_S_UNSUPP;