Commit a67834f8 authored by Noralf Trønnes's avatar Noralf Trønnes Committed by Daniel Vetter

drm: drm_minor_register(): Clean up debugfs on failure

Call drm_debugfs_cleanup() in case drm_debugfs_init() fails to
cover for failure in the drm_driver.debugfs_init callback.
Signed-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-3-noralf@tronnes.org
parent 086f2e5c
...@@ -221,7 +221,7 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type) ...@@ -221,7 +221,7 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type)
ret = drm_debugfs_init(minor, minor->index, drm_debugfs_root); ret = drm_debugfs_init(minor, minor->index, drm_debugfs_root);
if (ret) { if (ret) {
DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/dri.\n"); DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/dri.\n");
return ret; goto err_debugfs;
} }
ret = device_add(minor->kdev); ret = device_add(minor->kdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment