Commit 2a08f2b8 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Daniel Vetter

panel: rocktech: 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: "Guido Günther" <agx@sigxcpu.org>
Cc: Thierry Reding <thierry.reding@gmail.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>
Reviewed-by: default avatarGuido Günther <agx@sigxcpu.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190613115717.GB26335@kroah.com
parent 90e73491
...@@ -257,20 +257,12 @@ static int allpixelson_set(void *data, u64 val) ...@@ -257,20 +257,12 @@ static int allpixelson_set(void *data, u64 val)
DEFINE_SIMPLE_ATTRIBUTE(allpixelson_fops, NULL, DEFINE_SIMPLE_ATTRIBUTE(allpixelson_fops, NULL,
allpixelson_set, "%llu\n"); allpixelson_set, "%llu\n");
static int jh057n_debugfs_init(struct jh057n *ctx) static void jh057n_debugfs_init(struct jh057n *ctx)
{ {
struct dentry *f;
ctx->debugfs = debugfs_create_dir(DRV_NAME, NULL); ctx->debugfs = debugfs_create_dir(DRV_NAME, NULL);
if (!ctx->debugfs)
return -ENOMEM;
f = debugfs_create_file("allpixelson", 0600, debugfs_create_file("allpixelson", 0600, ctx->debugfs, ctx,
ctx->debugfs, ctx, &allpixelson_fops); &allpixelson_fops);
if (!f)
return -ENOMEM;
return 0;
} }
static void jh057n_debugfs_remove(struct jh057n *ctx) static void jh057n_debugfs_remove(struct jh057n *ctx)
......
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