hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/virt/kvm/coalesced_mmio.c
....@@ -187,15 +187,17 @@
187187 r = kvm_io_bus_unregister_dev(kvm,
188188 zone->pio ? KVM_PIO_BUS : KVM_MMIO_BUS, &dev->dev);
189189
190
+ kvm_iodevice_destructor(&dev->dev);
191
+
190192 /*
191193 * On failure, unregister destroys all devices on the
192194 * bus _except_ the target device, i.e. coalesced_zones
193
- * has been modified. No need to restart the walk as
194
- * there aren't any zones left.
195
+ * has been modified. Bail after destroying the target
196
+ * device, there's no need to restart the walk as there
197
+ * aren't any zones left.
195198 */
196199 if (r)
197200 break;
198
- kvm_iodevice_destructor(&dev->dev);
199201 }
200202 }
201203