Skip to contentSkip to conversation

virtio-iommu: Fix coverity issue in virtio_iommu_handle_command()

PATCH Applied Eric Auger 2 participants 2 messages Jul 8, 2020 – Jul 9, 2020

lore
Share & tools
lore

Eric Auger

author
#0 lore raw

PATCH 1/1 virtio-iommu: Fix coverity issue in virtio_iommu_handle_command()

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")

---
 hw/virtio/virtio-iommu.c | 1 +
 1 file changed, 1 insertion(+)
hw/virtio/virtio-iommu.c +1 -0
index b39e836181..5d56865e56 100644
@@ -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;
Signature · 1 line
2.21.3
#1 lore raw
Quoted 11 lines · Eric Auger

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")

---
 hw/virtio/virtio-iommu.c | 1 +
 1 file changed, 1 insertion(+)

Applied to target-arm.next, thanks.

-- PMM