Skip to content

Commit

Permalink
drm: drm_minor_register(): Clean up debugfs on failure
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
notro authored and danvet committed Jan 27, 2017
1 parent 086f2e5 commit a67834f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
if (ret) {
DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/dri.\n");
return ret;
goto err_debugfs;
}

ret = device_add(minor->kdev);
Expand Down

0 comments on commit a67834f

Please sign in to comment.