summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/bochs/bochs_fbdev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bochs/bochs_fbdev.c b/drivers/gpu/drm/bochs/bochs_fbdev.c
index 471bd588550b..c38deffa14de 100644
--- a/drivers/gpu/drm/bochs/bochs_fbdev.c
+++ b/drivers/gpu/drm/bochs/bochs_fbdev.c
@@ -192,6 +192,8 @@ void bochs_fbdev_fini(struct bochs_device *bochs)
if (bochs->fb.initialized)
bochs_fbdev_destroy(bochs);
- drm_fb_helper_fini(&bochs->fb.helper);
+ if (bochs->fb.helper.fbdev)
+ drm_fb_helper_fini(&bochs->fb.helper);
+
bochs->fb.initialized = false;
}