diff options
-rw-r--r-- | drivers/virtio/virtio_balloon.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index bd3ae324a1a2..71af7b5abe01 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c | |||
@@ -191,7 +191,8 @@ static void leak_balloon(struct virtio_balloon *vb, size_t num) | |||
191 | * virtio_has_feature(vdev, VIRTIO_BALLOON_F_MUST_TELL_HOST); | 191 | * virtio_has_feature(vdev, VIRTIO_BALLOON_F_MUST_TELL_HOST); |
192 | * is true, we *have* to do it in this order | 192 | * is true, we *have* to do it in this order |
193 | */ | 193 | */ |
194 | tell_host(vb, vb->deflate_vq); | 194 | if (vb->num_pfns != 0) |
195 | tell_host(vb, vb->deflate_vq); | ||
195 | mutex_unlock(&vb->balloon_lock); | 196 | mutex_unlock(&vb->balloon_lock); |
196 | release_pages_by_pfn(vb->pfns, vb->num_pfns); | 197 | release_pages_by_pfn(vb->pfns, vb->num_pfns); |
197 | } | 198 | } |