virtio-mmio: fix switch-case in virtio_mmio_write() The switch-case in virtio_mmio_write() forgets to break when it finishes a case statement.
Signed-off-by: Ying-Shiuan Pan <ys...@itri.org.tw> --- hw/virtio-mmio.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/virtio-mmio.c b/hw/virtio-mmio.c index 7725f71..05d886a 100644 --- a/hw/virtio-mmio.c +++ b/hw/virtio-mmio.c @@ -164,10 +164,13 @@ static void virtio_mmio_write(void *opaque, target_phys_addr_t offset, switch (size) { case 1: virtio_config_writeb(vdev, offset, value); + break; case 2: virtio_config_writew(vdev, offset, value); + break; case 4: virtio_config_writel(vdev, offset, value); + break; default: abort(); } --