diff options
author | Wambui Karuga <wambui.karugax@gmail.com> | 2020-03-10 16:31:12 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2020-03-18 16:23:57 +0100 |
commit | 9e2fd463ec346d1c1703b336bf9762780ccaa8c7 (patch) | |
tree | 9646a53071c8721c64fc4d5104a7c5b3573770bc /drivers/gpu/drm/msm/msm_debugfs.c | |
parent | 14b461950c6f3440d5e3e32ba742d86dc0345d84 (diff) | |
download | lwn-9e2fd463ec346d1c1703b336bf9762780ccaa8c7.tar.gz lwn-9e2fd463ec346d1c1703b336bf9762780ccaa8c7.zip |
drm/msm: remove checks for return value of drm_debugfs_create_files()
Since commit 987d65d01356 (drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files never
fails and only returns 0. Therefore, the unnecessary checks for its
return value and error handling in various debugfs_init() functions in
drm/msm and have the functions return 0 directly.
v2: have debug functions return 0 instead of void to avoid build
breakage and ensure standalone compilation.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-9-wambui.karugax@gmail.com
Diffstat (limited to 'drivers/gpu/drm/msm/msm_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_debugfs.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/msm/msm_debugfs.c b/drivers/gpu/drm/msm/msm_debugfs.c index 1c74381a4fc9..6378157e1fff 100644 --- a/drivers/gpu/drm/msm/msm_debugfs.c +++ b/drivers/gpu/drm/msm/msm_debugfs.c @@ -220,14 +220,9 @@ int msm_debugfs_init(struct drm_minor *minor) struct msm_drm_private *priv = dev->dev_private; int ret; - ret = drm_debugfs_create_files(msm_debugfs_list, - ARRAY_SIZE(msm_debugfs_list), - minor->debugfs_root, minor); - - if (ret) { - DRM_DEV_ERROR(dev->dev, "could not install msm_debugfs_list\n"); - return ret; - } + drm_debugfs_create_files(msm_debugfs_list, + ARRAY_SIZE(msm_debugfs_list), + minor->debugfs_root, minor); debugfs_create_file("gpu", S_IRUSR, minor->debugfs_root, dev, &msm_gpu_fops); @@ -238,7 +233,7 @@ int msm_debugfs_init(struct drm_minor *minor) return ret; } - return ret; + return 0; } #endif |