Skip to contentSkip to conversation

virtio-pci: correctly unregister root device on error

PATCH New Mark McLoughlin 1 participant 1 message Jul 7, 2009 virtio core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio-pci: correctly unregister root device on error

If pci_register_driver() fails we're incorrectly unregistering the root device with device_unregister() rather than root_device_unregister().

---
 drivers/virtio/virtio_pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/virtio/virtio_pci.c +1 -1
index 330aacb..2cafa62 100644
@@ -440,7 +440,7 @@ static int __init virtio_pci_init(void)
 
 	err = pci_register_driver(&virtio_pci_driver);
 	if (err)
-		device_unregister(virtio_pci_root);
+		root_device_unregister(virtio_pci_root);
 
 	return err;
 }
Signature · 1 line
1.6.2.5