[PATCH] drm: Fix error handling in drm_connector_register
Daniel Vetter
daniel.vetter at ffwll.ch
Fri May 6 12:55:02 UTC 2016
When debugfs or sysfs registration failed, we failed to clean up the
idr registration. Reorder to fix this.
Cc: Dave Airlie <airlied at gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
drivers/gpu/drm/drm_crtc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index a93cb4cffb0e..8842909b93d6 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1030,8 +1030,6 @@ int drm_connector_register(struct drm_connector *connector)
{
int ret;
- drm_mode_object_register(connector->dev, &connector->base);
-
ret = drm_sysfs_connector_add(connector);
if (ret)
return ret;
@@ -1042,6 +1040,8 @@ int drm_connector_register(struct drm_connector *connector)
return ret;
}
+ drm_mode_object_register(connector->dev, &connector->base);
+
return 0;
}
EXPORT_SYMBOL(drm_connector_register);
--
2.8.1
More information about the dri-devel
mailing list