[PATCH 014/115] drm/radeon: cleanup properly if mmio mapping fails

From: Luis Henriques
Date: Mon May 20 2013 - 07:16:12 EST -stable review patch. If anyone has any objections, please let me know.


From: Alex Deucher <alexander.deucher@xxxxxxx>

commit 0cd9cb76ae26a19df21abc6f94f5fff141e689c7 upstream.

If we fail to map the mmio BAR, skip driver tear down
that requires mmio.

Should fix:

Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
[ luis: adjust context ]
Signed-off-by: Luis Henriques <luis.henriques@xxxxxxxxxxxxx>
drivers/gpu/drm/radeon/radeon_kms.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 5c58d7d..c574139 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;
dev->dev_private = NULL;
return 0;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/