aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher2013-04-12 18:15:52 -0500
committerGreg Kroah-Hartman2013-05-11 15:54:06 -0500
commit1b441ba2cf1d50f57cb68d26d3303cb695df0f66 (patch)
treeee80aab5acbfa889746098fe1fb3ec0ee2255446
parent92f3345933a597abab9112d0127c29b9f4535b9a (diff)
downloadkernel-omap-1b441ba2cf1d50f57cb68d26d3303cb695df0f66.tar.gz
kernel-omap-1b441ba2cf1d50f57cb68d26d3303cb695df0f66.tar.xz
kernel-omap-1b441ba2cf1d50f57cb68d26d3303cb695df0f66.zip
drm/radeon: cleanup properly if mmio mapping fails
commit 0cd9cb76ae26a19df21abc6f94f5fff141e689c7 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 9c312f9afb68..bc36922d05f1 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)
50 50
51 if (rdev == NULL) 51 if (rdev == NULL)
52 return 0; 52 return 0;
53 if (rdev->rmmio == NULL)
54 goto done_free;
53 radeon_acpi_fini(rdev); 55 radeon_acpi_fini(rdev);
54 radeon_modeset_fini(rdev); 56 radeon_modeset_fini(rdev);
55 radeon_device_fini(rdev); 57 radeon_device_fini(rdev);
58
59done_free:
56 kfree(rdev); 60 kfree(rdev);
57 dev->dev_private = NULL; 61 dev->dev_private = NULL;
58 return 0; 62 return 0;