Commit e59a2508 authored by Gerd Hoffmann's avatar Gerd Hoffmann

drm/bochs: deinit bugfix

Check whenever mode_config was actually properly
initialized before trying to clean it up.
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20200207124348.21641-1-kraxel@redhat.com
parent cb05ec58
...@@ -163,6 +163,9 @@ int bochs_kms_init(struct bochs_device *bochs) ...@@ -163,6 +163,9 @@ int bochs_kms_init(struct bochs_device *bochs)
void bochs_kms_fini(struct bochs_device *bochs) void bochs_kms_fini(struct bochs_device *bochs)
{ {
if (!bochs->dev->mode_config.num_connector)
return;
drm_atomic_helper_shutdown(bochs->dev); drm_atomic_helper_shutdown(bochs->dev);
drm_mode_config_cleanup(bochs->dev); drm_mode_config_cleanup(bochs->dev);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment