mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/vkms: Drop unnecessary call to drm_crtc_cleanup()
@ 2024-10-31 18:38 José Expósito
  2024-10-31 18:43 ` Louis Chauvet
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: José Expósito @ 2024-10-31 18:38 UTC (permalink / raw)
  To: louis.chauvet
  Cc: hamohammed.sa, simona, melissa.srw, maarten.lankhorst, mripard,
	tzimmermann, airlied, dri-devel, linux-kernel,
	José Expósito

CRTC creation uses drmm_crtc_init_with_planes(), which automatically
handles cleanup. However, an unnecessary call to drm_crtc_cleanup() is
still present in the vkms_output_init() error path.

Fixes: 99cc528ebe92 ("drm/vkms: Use drmm_crtc_init_with_planes()")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/vkms/vkms_output.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/vkms/vkms_output.c b/drivers/gpu/drm/vkms/vkms_output.c
index 0a5a185aa0b0..25a99fde126c 100644
--- a/drivers/gpu/drm/vkms/vkms_output.c
+++ b/drivers/gpu/drm/vkms/vkms_output.c
@@ -92,7 +92,7 @@ int vkms_output_init(struct vkms_device *vkmsdev, int index)
 				 DRM_MODE_CONNECTOR_VIRTUAL);
 	if (ret) {
 		DRM_ERROR("Failed to init connector\n");
-		goto err_connector;
+		return ret;
 	}
 
 	drm_connector_helper_add(connector, &vkms_conn_helper_funcs);
@@ -131,8 +131,5 @@ int vkms_output_init(struct vkms_device *vkmsdev, int index)
 err_encoder:
 	drm_connector_cleanup(connector);
 
-err_connector:
-	drm_crtc_cleanup(crtc);
-
 	return ret;
 }
-- 
2.47.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-04 11:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-31 18:38 [PATCH] drm/vkms: Drop unnecessary call to drm_crtc_cleanup() José Expósito
2024-10-31 18:43 ` Louis Chauvet
2024-11-01 10:04 ` Maíra Canal
2024-11-04 11:08 ` Louis Chauvet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®