From e59a2508d90f393c8423716349db315e32b67559 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 7 Feb 2020 13:43:48 +0100 Subject: [PATCH] drm/bochs: deinit bugfix Check whenever mode_config was actually properly initialized before trying to clean it up. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20200207124348.21641-1-kraxel@redhat.com --- drivers/gpu/drm/bochs/bochs_kms.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 7410b0ea4623..8066d7d370d5 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -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); } -- 2.30.2