* [PATCH] virtio-pci: correctly unregister root device on error
@ 2009-07-07 7:26 Mark McLoughlin
0 siblings, 0 replies; 2+ messages in thread
From: Mark McLoughlin @ 2009-07-07 7:26 UTC (permalink / raw)
To: Rusty Russell; +Cc: linux-kernel, virtualization, Don Zickus
If pci_register_driver() fails we're incorrectly unregistering the root
device with device_unregister() rather than root_device_unregister().
Reported-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
drivers/virtio/virtio_pci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 330aacb..2cafa62 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -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;
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] virtio-pci: correctly unregister root device on error
@ 2009-07-07 7:26 Mark McLoughlin
0 siblings, 0 replies; 2+ messages in thread
From: Mark McLoughlin @ 2009-07-07 7:26 UTC (permalink / raw)
To: Rusty Russell; +Cc: Don Zickus, linux-kernel, virtualization
If pci_register_driver() fails we're incorrectly unregistering the root
device with device_unregister() rather than root_device_unregister().
Reported-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
drivers/virtio/virtio_pci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 330aacb..2cafa62 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -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;
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-07 7:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-07 7:26 [PATCH] virtio-pci: correctly unregister root device on error Mark McLoughlin
-- strict thread matches above, loose matches on Subject: below --
2009-07-07 7:26 Mark McLoughlin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.