From e30f328c7429d4e891ce6da26af95c607f392739 Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Tue, 27 Apr 2010 18:04:01 +0530 Subject: [PATCH] virtio-serial: Remove redundant check for 0-sized write request The check for a 0-sized write request to a guest port is not necessary; the while loop below won't be executed in this case and all will be fine. Signed-off-by: Amit Shah Signed-off-by: Anthony Liguori --- hw/virtio-serial-bus.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 8efba0b..c1d9851 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial-bus.c @@ -91,9 +91,6 @@ static size_t write_to_port(VirtIOSerialPort *port, if (!virtio_queue_ready(vq)) { return 0; } - if (!size) { - return 0; - } while (offset < size) { int i; -- 2.7.4