From 4e1f8c73e786d23ff4adb8659b8697b7479e3a05 Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Tue, 27 Apr 2010 09:07:34 -0300 Subject: [PATCH 07/20] virtio-serial: Remove redundant check for 0-sized write request RH-Author: Amit Shah Message-id: <1272359264-8464-8-git-send-email-amit.shah@redhat.com> Patchwork-id: 8853 O-Subject: [RHEL6 PATCH v4 07/17] virtio-serial: Remove redundant check for 0-sized write request Bugzilla: 574296 RH-Acked-by: Gerd Hoffmann RH-Acked-by: Juan Quintela RH-Acked-by: Alon Levy 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. Bugzilla: 574296 Upstream: Signed-off-by: Amit Shah --- hw/virtio-serial-bus.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) Signed-off-by: Eduardo Habkost --- hw/virtio-serial-bus.c | 3 --- 1 files changed, 0 insertions(+), 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; -- 1.7.0.3