diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2009-07-07 03:26:45 -0400 |
|---|---|---|
| committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-07-17 08:17:47 -0400 |
| commit | 4b892e6582e3a4fe01f623aea386907270d5bf83 (patch) | |
| tree | 82214468d537c8cf90b1fc0195bf33c688db3bfd | |
| parent | d9ecdea7ed7467db32ec160f4eca46c279255606 (diff) | |
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().
Reported-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| -rw-r--r-- | 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 193c8f0e5cc5..bcec78ffc765 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
| @@ -669,7 +669,7 @@ static int __init virtio_pci_init(void) | |||
| 669 | 669 | ||
| 670 | err = pci_register_driver(&virtio_pci_driver); | 670 | err = pci_register_driver(&virtio_pci_driver); |
| 671 | if (err) | 671 | if (err) |
| 672 | device_unregister(virtio_pci_root); | 672 | root_device_unregister(virtio_pci_root); |
| 673 | 673 | ||
| 674 | return err; | 674 | return err; |
| 675 | } | 675 | } |
