Commit b089e694 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Kalle Valo

qtnfmac: 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: Igor Mitsyanko <imitsyanko@quantenna.com>
Cc: Avinash Patil <avinashp@quantenna.com>
Cc: Sergey Matyukevich <smatyukevich@quantenna.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: default avatarSergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 3059785b
......@@ -3,17 +3,9 @@
#include "debug.h"
#undef pr_fmt
#define pr_fmt(fmt) "qtnfmac dbg: %s: " fmt, __func__
void qtnf_debugfs_init(struct qtnf_bus *bus, const char *name)
{
bus->dbg_dir = debugfs_create_dir(name, NULL);
if (IS_ERR_OR_NULL(bus->dbg_dir)) {
pr_warn("failed to create debugfs root dir\n");
bus->dbg_dir = NULL;
}
}
void qtnf_debugfs_remove(struct qtnf_bus *bus)
......@@ -25,9 +17,5 @@ void qtnf_debugfs_remove(struct qtnf_bus *bus)
void qtnf_debugfs_add_entry(struct qtnf_bus *bus, const char *name,
int (*fn)(struct seq_file *seq, void *data))
{
struct dentry *entry;
entry = debugfs_create_devm_seqfile(bus->dev, name, bus->dbg_dir, fn);
if (IS_ERR_OR_NULL(entry))
pr_warn("failed to add entry (%s)\n", name);
debugfs_create_devm_seqfile(bus->dev, name, bus->dbg_dir, fn);
}
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