diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-04-12 19:15:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-11 13:54:06 -0700 |
commit | 1b441ba2cf1d50f57cb68d26d3303cb695df0f66 (patch) | |
tree | ee80aab5acbfa889746098fe1fb3ec0ee2255446 /drivers/gpu/drm/radeon/radeon_kms.c | |
parent | 92f3345933a597abab9112d0127c29b9f4535b9a (diff) | |
download | lwn-1b441ba2cf1d50f57cb68d26d3303cb695df0f66.tar.gz lwn-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>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_kms.c')
-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 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) 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; |