diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 68e060b9852cbd5e8422e0a31bf76a949db8de89..f583e545c04c4c54b5b9559fa4e89c1ae70cc75b 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -693,7 +693,7 @@ virHostdevPreparePCIDevices(virHostdevManagerPtr hostdev_mgr, resetvfnetconfig: for (i = 0; - last_processed_hostdev_vf != -1 && i < last_processed_hostdev_vf; i++) + last_processed_hostdev_vf != -1 && i <= last_processed_hostdev_vf; i++) virHostdevNetConfigRestore(hostdevs[i], hostdev_mgr->stateDir, NULL); reattachdevs: