aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_stub.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-05-05 20:02:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-05 20:02:05 -0400
commit413f81eba35d6ede9289b0c8a920c013a84fac71 (patch)
tree688a864f1fa822ac9b60b08add6c7e2e9d35a372 /drivers/gpu/drm/drm_stub.c
parent899ad580fe93c6d2a9f364fb0329ef2c259ccd1d (diff)
parent42beefc0093725ec0f8cea340cc54c36ccaceea0 (diff)
Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/r128: fix r128 ioremaps to use ioremap_wc. drm: cleanup properly in drm_get_dev() failure paths drm: clean the map list before destroying the hash table drm: remove unreachable code in drm_sysfs.c drm: add control node checks missing from kms merge drm/kms: don't try to shortcut drm mode set function drm/radeon: bump minor version for occlusion queries support
Diffstat (limited to 'drivers/gpu/drm/drm_stub.c')
-rw-r--r--drivers/gpu/drm/drm_stub.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index ef878615c49f..b9631e3a1ea6 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -402,14 +402,14 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
402 if (dev->driver->load) { 402 if (dev->driver->load) {
403 ret = dev->driver->load(dev, ent->driver_data); 403 ret = dev->driver->load(dev, ent->driver_data);
404 if (ret) 404 if (ret)
405 goto err_g3; 405 goto err_g4;
406 } 406 }
407 407
408 /* setup the grouping for the legacy output */ 408 /* setup the grouping for the legacy output */
409 if (drm_core_check_feature(dev, DRIVER_MODESET)) { 409 if (drm_core_check_feature(dev, DRIVER_MODESET)) {
410 ret = drm_mode_group_init_legacy_group(dev, &dev->primary->mode_group); 410 ret = drm_mode_group_init_legacy_group(dev, &dev->primary->mode_group);
411 if (ret) 411 if (ret)
412 goto err_g3; 412 goto err_g4;
413 } 413 }
414 414
415 list_add_tail(&dev->driver_item, &driver->device_list); 415 list_add_tail(&dev->driver_item, &driver->device_list);
@@ -420,8 +420,11 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
420 420
421 return 0; 421 return 0;
422 422
423err_g3: 423err_g4:
424 drm_put_minor(&dev->primary); 424 drm_put_minor(&dev->primary);
425err_g3:
426 if (drm_core_check_feature(dev, DRIVER_MODESET))
427 drm_put_minor(&dev->control);
425err_g2: 428err_g2:
426 pci_disable_device(pdev); 429 pci_disable_device(pdev);
427err_g1: 430err_g1:
@@ -502,11 +505,11 @@ void drm_put_dev(struct drm_device *dev)
502 dev->agp = NULL; 505 dev->agp = NULL;
503 } 506 }
504 507
505 drm_ht_remove(&dev->map_hash);
506 drm_ctxbitmap_cleanup(dev);
507
508 list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head) 508 list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head)
509 drm_rmmap(dev, r_list->map); 509 drm_rmmap(dev, r_list->map);
510 drm_ht_remove(&dev->map_hash);
511
512 drm_ctxbitmap_cleanup(dev);
510 513
511 if (drm_core_check_feature(dev, DRIVER_MODESET)) 514 if (drm_core_check_feature(dev, DRIVER_MODESET))
512 drm_put_minor(&dev->control); 515 drm_put_minor(&dev->control);