提交 e26ae7c0 编写于 作者: G Greg Kroah-Hartman 提交者: Tomi Valkeinen

omapdrm: 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: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: Jyri Sarha <jsarha@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: zhong jiang <zhongjiang@huawei.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190613115749.GC26335@kroah.comReviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190704023557.4551-1-huangfq.daxian@gmail.com
上级 3037e0c5
...@@ -923,7 +923,6 @@ dss_debugfs_create_file(struct dss_device *dss, const char *name, ...@@ -923,7 +923,6 @@ dss_debugfs_create_file(struct dss_device *dss, const char *name,
void *data) void *data)
{ {
struct dss_debugfs_entry *entry; struct dss_debugfs_entry *entry;
struct dentry *d;
entry = kzalloc(sizeof(*entry), GFP_KERNEL); entry = kzalloc(sizeof(*entry), GFP_KERNEL);
if (!entry) if (!entry)
...@@ -931,15 +930,9 @@ dss_debugfs_create_file(struct dss_device *dss, const char *name, ...@@ -931,15 +930,9 @@ dss_debugfs_create_file(struct dss_device *dss, const char *name,
entry->show_fn = show_fn; entry->show_fn = show_fn;
entry->data = data; entry->data = data;
entry->dentry = debugfs_create_file(name, 0444, dss->debugfs.root,
entry, &dss_debug_fops);
d = debugfs_create_file(name, 0444, dss->debugfs.root, entry,
&dss_debug_fops);
if (IS_ERR(d)) {
kfree(entry);
return ERR_CAST(d);
}
entry->dentry = d;
return entry; return entry;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册