As there is no need to check the return value of
drm_debugfs_create_files, remove unnecessary checks and error handling
statement blocks.

Signed-off-by: Wambui Karuga <wambui.karu...@gmail.com>
---
 drivers/gpu/drm/drm_debugfs.c | 28 +++++-----------------------
 1 file changed, 5 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index 4e673d318503..6a2f141b6a38 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -215,35 +215,17 @@ int drm_debugfs_init(struct drm_minor *minor, int 
minor_id,
        sprintf(name, "%d", minor_id);
        minor->debugfs_root = debugfs_create_dir(name, root);
 
-       ret = drm_debugfs_create_files(drm_debugfs_list, DRM_DEBUGFS_ENTRIES,
-                                      minor->debugfs_root, minor);
-       if (ret) {
-               debugfs_remove(minor->debugfs_root);
-               minor->debugfs_root = NULL;
-               DRM_ERROR("Failed to create core drm debugfs files\n");
-               return ret;
-       }
+       drm_debugfs_create_files(drm_debugfs_list, DRM_DEBUGFS_ENTRIES,
+                                minor->debugfs_root, minor);
 
        if (drm_drv_uses_atomic_modeset(dev)) {
-               ret = drm_atomic_debugfs_init(minor);
-               if (ret) {
-                       DRM_ERROR("Failed to create atomic debugfs files\n");
-                       return ret;
-               }
+               drm_atomic_debugfs_init(minor);
        }
 
        if (drm_core_check_feature(dev, DRIVER_MODESET)) {
-               ret = drm_framebuffer_debugfs_init(minor);
-               if (ret) {
-                       DRM_ERROR("Failed to create framebuffer debugfs 
file\n");
-                       return ret;
-               }
+               drm_framebuffer_debugfs_init(minor);
 
-               ret = drm_client_debugfs_init(minor);
-               if (ret) {
-                       DRM_ERROR("Failed to create client debugfs file\n");
-                       return ret;
-               }
+               drm_client_debugfs_init(minor);
        }
 
        if (dev->driver->debugfs_init) {
-- 
2.25.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to