]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/bochs: deinit bugfix
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 7 Feb 2020 12:43:48 +0000 (13:43 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 10 Feb 2020 11:54:32 +0000 (12:54 +0100)
Check whenever mode_config was actually properly
initialized before trying to clean it up.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20200207124348.21641-1-kraxel@redhat.com
drivers/gpu/drm/bochs/bochs_kms.c

index 7410b0ea462340af2c322654bdaf0d6427c4883c..8066d7d370d5b5cf50932e6cfcecfa6762c19347 100644 (file)
@@ -163,6 +163,9 @@ int bochs_kms_init(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_mode_config_cleanup(bochs->dev);
 }