diff options
-rw-r--r-- | linux-core/drm_drv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index 5c25fe7c..e422888c 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -394,12 +394,12 @@ void __exit drm_exit(struct drm_driver *driver) if (head->dev->driver != driver) continue; dev = head->dev; - } - if (dev) { - /* release the pci driver */ - if (dev->pdev) - pci_dev_put(dev->pdev); - drm_cleanup(dev); + if (dev) { + /* release the pci driver */ + if (dev->pdev) + pci_dev_put(dev->pdev); + drm_cleanup(dev); + } } } else pci_unregister_driver(&driver->pci_driver); |