All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio-iommu: Fix coverity issue in virtio_iommu_handle_command()
@ 2020-07-08 16:01 Eric Auger
  2020-07-09 14:18 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Auger @ 2020-07-08 16:01 UTC (permalink / raw)
  To: eric.auger.pro, eric.auger, qemu-devel, qemu-arm, peter.maydell

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>
---
 hw/virtio/virtio-iommu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
index b39e836181..5d56865e56 100644
--- a/hw/virtio/virtio-iommu.c
+++ b/hw/virtio/virtio-iommu.c
@@ -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;
-- 
2.21.3



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] virtio-iommu: Fix coverity issue in virtio_iommu_handle_command()
  2020-07-08 16:01 [PATCH] virtio-iommu: Fix coverity issue in virtio_iommu_handle_command() Eric Auger
@ 2020-07-09 14:18 ` Peter Maydell
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2020-07-09 14:18 UTC (permalink / raw)
  To: Eric Auger; +Cc: qemu-arm, QEMU Developers, Eric Auger

On Wed, 8 Jul 2020 at 17:02, Eric Auger <eric.auger@redhat.com> wrote:
>
> 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>
> ---
>  hw/virtio/virtio-iommu.c | 1 +
>  1 file changed, 1 insertion(+)



Applied to target-arm.next, thanks.

-- PMM


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-09 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08 16:01 [PATCH] virtio-iommu: Fix coverity issue in virtio_iommu_handle_command() Eric Auger
2020-07-09 14:18 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.