Skip to content

Commit a67834f

Browse files
notrodanvet
authored andcommitted
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: Noralf Trønnes <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 086f2e5 commit a67834f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/drm_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type)
221221
ret = drm_debugfs_init(minor, minor->index, drm_debugfs_root);
222222
if (ret) {
223223
DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/dri.\n");
224-
return ret;
224+
goto err_debugfs;
225225
}
226226

227227
ret = device_add(minor->kdev);

0 commit comments

Comments
 (0)