mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 05:34:00 +08:00
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 <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462539302-27764-1-git-send-email-daniel.vetter@ffwll.ch
This commit is contained in:
parent
e2d800a3ce
commit
fdf2c85f26
@ -1030,8 +1030,6 @@ int drm_connector_register(struct drm_connector *connector)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
drm_mode_object_register(connector->dev, &connector->base);
|
|
||||||
|
|
||||||
ret = drm_sysfs_connector_add(connector);
|
ret = drm_sysfs_connector_add(connector);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
@ -1042,6 +1040,8 @@ int drm_connector_register(struct drm_connector *connector)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
drm_mode_object_register(connector->dev, &connector->base);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(drm_connector_register);
|
EXPORT_SYMBOL(drm_connector_register);
|
||||||
|
Loading…
Reference in New Issue
Block a user