radeon: Only destroy fbdev framebuffer if it was initialized
authorMichel Dänzer <michel.daenzer@amd.com>
Mon, 11 Sep 2017 08:09:17 +0000 (17:09 +0900)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Sep 2017 16:10:12 +0000 (12:10 -0400)
commite97f12f359775de4fabfb507f836ebffa20f4986
tree7ffe6d4de9b810551f7f0da34c478ae1de0c91be
parenta072c5f896beba806b4b867d478e1b90f94ba29b
radeon: Only destroy fbdev framebuffer if it was initialized

Fixes crash when trying to unload the radeon module before the fbdev
framebuffer was initialized, which can happen since the DRM fbdev helper
code supports deferred setup.

Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_fb.c