From cb4b4fde82b064472c13fb9d983ca36a70e560aa Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 3 Aug 2011 15:24:41 +0300 Subject: vhost: remove an incorrect assert The 'to' can go negative when the first region gets removed (it gets incremented by to 0 immediately afterward), which makes the assertion fail. Nothing breaks if to < 0 here so just remove the assert. Tested-by: David Ahern Signed-off-by: Michael S. Tsirkin --- hw/vhost.c | 1 - 1 file changed, 1 deletion(-) (limited to 'hw/vhost.c') diff --git a/hw/vhost.c b/hw/vhost.c index c3d8821..19e7255 100644 --- a/hw/vhost.c +++ b/hw/vhost.c @@ -120,7 +120,6 @@ static void vhost_dev_unassign_memory(struct vhost_dev *dev, if (start_addr <= reg->guest_phys_addr && memlast >= reglast) { --dev->mem->nregions; --to; - assert(to >= 0); ++overlap_middle; continue; } -- cgit v1.1