aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_kms.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-04-12 19:15:52 -0400
committerAlex Deucher <alexander.deucher@amd.com>2013-04-15 10:34:12 -0400
commit0cd9cb76ae26a19df21abc6f94f5fff141e689c7 (patch)
treef2048fcc85cbdda8ead7dc5d0e5244ed8a8d475c /drivers/gpu/drm/radeon/radeon_kms.c
parent2e97be73e5f74a317232740ae82eb8f95326a660 (diff)
drm/radeon: cleanup properly if mmio mapping fails
If we fail to map the mmio BAR, skip driver tear down that requires mmio. Should fix: https://bugzilla.kernel.org/show_bug.cgi?id=56541 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_kms.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_kms.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index a24b9ba4de7..4f2d4f4c1da 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -50,9 +50,13 @@ int radeon_driver_unload_kms(struct drm_device *dev)
if (rdev == NULL)
return 0;
+ if (rdev->rmmio == NULL)
+ goto done_free;
radeon_acpi_fini(rdev);
radeon_modeset_fini(rdev);
radeon_device_fini(rdev);
+
+done_free:
kfree(rdev);
dev->dev_private = NULL;
return 0;