Commit aab8df14 authored by Dave Airlie's avatar Dave Airlie Committed by Dave Airlie

drm: cleanup properly on drm module unload

Cleanup multiple cards properly
Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent 8d2ea625
...@@ -342,12 +342,12 @@ void drm_exit(struct drm_driver *driver) ...@@ -342,12 +342,12 @@ void drm_exit(struct drm_driver *driver)
if (head->dev->driver != driver) if (head->dev->driver != driver)
continue; continue;
dev = head->dev; dev = head->dev;
} if (dev) {
if (dev) { /* release the pci driver */
/* release the pci driver */ if (dev->pdev)
if (dev->pdev) pci_dev_put(dev->pdev);
pci_dev_put(dev->pdev); drm_cleanup(dev);
drm_cleanup(dev); }
} }
DRM_INFO("Module unloaded\n"); DRM_INFO("Module unloaded\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment