drm: cleanup properly on drm module unload

Cleanup multiple cards properly

Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
Dave Airlie 2006-01-11 22:32:51 +11:00 committed by Dave Airlie
parent 8d2ea62581
commit aab8df141f
1 changed files with 6 additions and 6 deletions

View File

@ -342,12 +342,12 @@ void 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);
}
}
DRM_INFO("Module unloaded\n");
}