diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-04-12 19:15:52 -0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-05-13 15:02:18 +0100 |
commit | 4b8fefaee7a9d4ae9583328d03fd796e1933569e (patch) | |
tree | aea247f951856d3b273b4139ac263c2cdd132c5f /drivers/gpu | |
parent | fb0b82ae4ec8e67379b51ac4e5e34c90857298ad (diff) | |
download | lwn-4b8fefaee7a9d4ae9583328d03fd796e1933569e.tar.gz lwn-4b8fefaee7a9d4ae9583328d03fd796e1933569e.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>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_kms.c | 4 |
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 be2c1224e68a..4bb9e274c878 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c @@ -39,8 +39,12 @@ int radeon_driver_unload_kms(struct drm_device *dev) if (rdev == NULL) return 0; + if (rdev->rmmio == NULL) + goto done_free; radeon_modeset_fini(rdev); radeon_device_fini(rdev); + +done_free: kfree(rdev); dev->dev_private = NULL; return 0; |