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

cw1200: 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: Solomon Peachy <pizza@shaftnet.org>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent b089e694
...@@ -371,28 +371,14 @@ int cw1200_debug_init(struct cw1200_common *priv) ...@@ -371,28 +371,14 @@ int cw1200_debug_init(struct cw1200_common *priv)
d->debugfs_phy = debugfs_create_dir("cw1200", d->debugfs_phy = debugfs_create_dir("cw1200",
priv->hw->wiphy->debugfsdir); priv->hw->wiphy->debugfsdir);
if (!d->debugfs_phy) debugfs_create_file("status", 0400, d->debugfs_phy, priv,
goto err; &cw1200_status_fops);
debugfs_create_file("counters", 0400, d->debugfs_phy, priv,
if (!debugfs_create_file("status", 0400, d->debugfs_phy, &cw1200_counters_fops);
priv, &cw1200_status_fops)) debugfs_create_file("wsm_dumps", 0200, d->debugfs_phy, priv,
goto err; &fops_wsm_dumps);
if (!debugfs_create_file("counters", 0400, d->debugfs_phy,
priv, &cw1200_counters_fops))
goto err;
if (!debugfs_create_file("wsm_dumps", 0200, d->debugfs_phy,
priv, &fops_wsm_dumps))
goto err;
return 0; return 0;
err:
priv->debug = NULL;
debugfs_remove_recursive(d->debugfs_phy);
kfree(d);
return ret;
} }
void cw1200_debug_release(struct cw1200_common *priv) void cw1200_debug_release(struct cw1200_common *priv)
......
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