diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2006-01-11 06:32:51 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-01-11 06:32:51 -0500 |
commit | aab8df141fdc4c4c9587521a24b6865390eaeb79 (patch) | |
tree | 073c4a8a7bf0ea2d72c73eba48fcd4f7e7e23b03 /drivers/char | |
parent | 8d2ea6258123d7a92a1f6ec638a8cad4a0604c43 (diff) |
drm: cleanup properly on drm module unload
Cleanup multiple cards properly
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/drm/drm_drv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c index 5714d7badc41..c4fa5a29582b 100644 --- a/drivers/char/drm/drm_drv.c +++ b/drivers/char/drm/drm_drv.c | |||
@@ -342,12 +342,12 @@ void drm_exit(struct drm_driver *driver) | |||
342 | if (head->dev->driver != driver) | 342 | if (head->dev->driver != driver) |
343 | continue; | 343 | continue; |
344 | dev = head->dev; | 344 | dev = head->dev; |
345 | } | 345 | if (dev) { |
346 | if (dev) { | 346 | /* release the pci driver */ |
347 | /* release the pci driver */ | 347 | if (dev->pdev) |
348 | if (dev->pdev) | 348 | pci_dev_put(dev->pdev); |
349 | pci_dev_put(dev->pdev); | 349 | drm_cleanup(dev); |
350 | drm_cleanup(dev); | 350 | } |
351 | } | 351 | } |
352 | DRM_INFO("Module unloaded\n"); | 352 | DRM_INFO("Module unloaded\n"); |
353 | } | 353 | } |