diff options
author | Noralf Trønnes <noralf@tronnes.org> | 2017-01-27 01:56:04 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-01-27 10:56:50 +0300 |
commit | a67834f8bfa1e2f48bb27d07b9a552ba7c3af82a (patch) | |
tree | e0a0a661ca73e50356235eda4b6df75f5113a1ed | |
parent | 086f2e5cde747dcae800b2d8b0ac7741a8c6fcbe (diff) | |
download | linux-a67834f8bfa1e2f48bb27d07b9a552ba7c3af82a.tar.xz |
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 <noralf@tronnes.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-3-noralf@tronnes.org
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 7e24103c47f1..18c1b2cbfcdb 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -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); |