Remove the explicit calls to drm_connector_register() and
drm_connector_unregister() from the parallel RGB setup track.
For standard drivers, these operations are redundant as they are already
handled automatically under the hood by drm_dev_register() and
drm_dev_unregister() during the master device probe lifecycle.
Collapsing these calls simplifies the error unwinding path down to a
single internal memory cleanup step, as stated on the gpu todo list.
Signed-off-by: Souradipto Das <souradiptodas6@gmail.com>
---
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
index 84eff7519e32..5b457c16966a 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
@@ -92,18 +92,12 @@ static int fsl_dcu_attach_panel(struct fsl_dcu_drm_device *fsl_dev,
return ret;
drm_connector_helper_add(connector, &connector_helper_funcs);
- ret = drm_connector_register(connector);
- if (ret < 0)
- goto err_cleanup;
-
ret = drm_connector_attach_encoder(connector, encoder);
if (ret < 0)
- goto err_sysfs;
+ goto err_cleanup;
return 0;
-err_sysfs:
- drm_connector_unregister(connector);
err_cleanup:
drm_connector_cleanup(connector);
return ret;
--
2.43.0