From: Noralf Trønnes Date: Thu, 26 Jan 2017 22:56:04 +0000 (+0100) Subject: drm: drm_minor_register(): Clean up debugfs on failure X-Git-Tag: v4.14-rc1~8^2~52^2~791 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a67834f8bfa1e2f48bb27d07b9a552ba7c3af82a;p=platform%2Fkernel%2Flinux-rpi3.git 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 Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-3-noralf@tronnes.org --- diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 7e24103..18c1b2c 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);