Commit 150c6624 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Benjamin Gaignard

sti: no need to check return value of debugfs_create functions

When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190613114618.GD13119@kroah.com
parent b792e640
...@@ -96,7 +96,6 @@ static struct drm_info_list sti_drm_dbg_list[] = { ...@@ -96,7 +96,6 @@ static struct drm_info_list sti_drm_dbg_list[] = {
static int sti_drm_dbg_init(struct drm_minor *minor) static int sti_drm_dbg_init(struct drm_minor *minor)
{ {
struct dentry *dentry;
int ret; int ret;
ret = drm_debugfs_create_files(sti_drm_dbg_list, ret = drm_debugfs_create_files(sti_drm_dbg_list,
...@@ -105,13 +104,8 @@ static int sti_drm_dbg_init(struct drm_minor *minor) ...@@ -105,13 +104,8 @@ static int sti_drm_dbg_init(struct drm_minor *minor)
if (ret) if (ret)
goto err; goto err;
dentry = debugfs_create_file("fps_show", S_IRUGO | S_IWUSR, debugfs_create_file("fps_show", S_IRUGO | S_IWUSR, minor->debugfs_root,
minor->debugfs_root, minor->dev, minor->dev, &sti_drm_fps_fops);
&sti_drm_fps_fops);
if (!dentry) {
ret = -ENOMEM;
goto err;
}
DRM_INFO("%s: debugfs installed\n", DRIVER_NAME); DRM_INFO("%s: debugfs installed\n", DRIVER_NAME);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment