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
This commit is contained in:
parent
2e97be73e5
commit
0cd9cb76ae
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue