drm: Fix error handling in drm_connector_register
Subsystems (2)
PATCH 1/1 drm: Fix error handling in drm_connector_register
When debugfs or sysfs registration failed, we failed to clean up the idr registration. Reorder to fix this.
Cc Dave Airlie <[email protected]>
Signed-off-by Daniel Vetter <[email protected]>
--- drivers/gpu/drm/drm_crtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_crtc.c +2 -2
@@ -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);
Signature · 6 lines
2.8.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Daniel Vetter
When debugfs or sysfs registration failed, we failed to clean up the idr registration. Reorder to fix this.
Cc Dave Airlie <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Had to check that we could do the idr_replace after exposing sysfs/debugfs objects and came to the conclusion that those objects do not depend upon the idr, so
Reviewed-by Chris Wilson <[email protected]>
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel