Skip to content

Commit 2393241

Browse files
notrogregkh
authored andcommitted
drm: drm_minor_register(): Clean up debugfs on failure
[ Upstream commit a67834f8bfa1e2f48bb27d07b9a552ba7c3af82a ] 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 Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4e0d26b commit 2393241

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/drm_drv.c

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

318318
ret = device_add(minor->kdev);

0 commit comments

Comments
 (0)