aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/virtio.c')
-rw-r--r--hw/virtio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/virtio.c b/hw/virtio.c
index cc8314da62..b94ab0f054 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -447,8 +447,7 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
sg->iov_len = 2 << 20;
sg->iov_base = qemu_malloc(sg->iov_len);
- if (sg->iov_base &&
- !(vring_desc_flags(vq, i) & VRING_DESC_F_WRITE)) {
+ if (!(vring_desc_flags(vq, i) & VRING_DESC_F_WRITE)) {
cpu_physical_memory_read(vring_desc_addr(vq, i),
sg->iov_base,
sg->iov_len);