Commit c70cab1a authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville

ath9k: remove unnecessary debugfs return code checks

Since the ath9k debugfs directory is cleaned up by debugfs_remove_recursive,
there's no point in checking the return code of every single debugfs create
line.
Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 716b1bf3
...@@ -1088,67 +1088,37 @@ int ath9k_init_debug(struct ath_hw *ah) ...@@ -1088,67 +1088,37 @@ int ath9k_init_debug(struct ath_hw *ah)
return -ENOMEM; return -ENOMEM;
#ifdef CONFIG_ATH_DEBUG #ifdef CONFIG_ATH_DEBUG
if (!debugfs_create_file("debug", S_IRUSR | S_IWUSR, debugfs_create_file("debug", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
sc->debug.debugfs_phy, sc, &fops_debug)) sc, &fops_debug);
goto err;
#endif #endif
debugfs_create_file("dma", S_IRUSR, sc->debug.debugfs_phy, sc,
if (!debugfs_create_file("dma", S_IRUSR, sc->debug.debugfs_phy, &fops_dma);
sc, &fops_dma)) debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc,
goto err; &fops_interrupt);
debugfs_create_file("wiphy", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
if (!debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc, &fops_wiphy);
sc, &fops_interrupt)) debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, sc,
goto err; &fops_xmit);
debugfs_create_file("stations", S_IRUSR, sc->debug.debugfs_phy, sc,
if (!debugfs_create_file("wiphy", S_IRUSR | S_IWUSR, &fops_stations);
sc->debug.debugfs_phy, sc, &fops_wiphy)) debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, sc,
goto err; &fops_misc);
debugfs_create_file("recv", S_IRUSR, sc->debug.debugfs_phy, sc,
if (!debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, &fops_recv);
sc, &fops_xmit)) debugfs_create_file("rx_chainmask", S_IRUSR | S_IWUSR,
goto err; sc->debug.debugfs_phy, sc, &fops_rx_chainmask);
debugfs_create_file("tx_chainmask", S_IRUSR | S_IWUSR,
if (!debugfs_create_file("stations", S_IRUSR, sc->debug.debugfs_phy, sc->debug.debugfs_phy, sc, &fops_tx_chainmask);
sc, &fops_stations)) debugfs_create_file("regidx", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
goto err; sc, &fops_regidx);
debugfs_create_file("regval", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
if (!debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, sc, &fops_regval);
sc, &fops_misc)) debugfs_create_bool("ignore_extcca", S_IRUSR | S_IWUSR,
goto err; sc->debug.debugfs_phy,
&ah->config.cwm_ignore_extcca);
if (!debugfs_create_file("recv", S_IRUSR, sc->debug.debugfs_phy, debugfs_create_file("regdump", S_IRUSR, sc->debug.debugfs_phy, sc,
sc, &fops_recv)) &fops_regdump);
goto err;
if (!debugfs_create_file("rx_chainmask", S_IRUSR | S_IWUSR,
sc->debug.debugfs_phy, sc, &fops_rx_chainmask))
goto err;
if (!debugfs_create_file("tx_chainmask", S_IRUSR | S_IWUSR,
sc->debug.debugfs_phy, sc, &fops_tx_chainmask))
goto err;
if (!debugfs_create_file("regidx", S_IRUSR | S_IWUSR,
sc->debug.debugfs_phy, sc, &fops_regidx))
goto err;
if (!debugfs_create_file("regval", S_IRUSR | S_IWUSR,
sc->debug.debugfs_phy, sc, &fops_regval))
goto err;
if (!debugfs_create_bool("ignore_extcca", S_IRUSR | S_IWUSR,
sc->debug.debugfs_phy, &ah->config.cwm_ignore_extcca))
goto err;
if (!debugfs_create_file("regdump", S_IRUSR, sc->debug.debugfs_phy,
sc, &fops_regdump))
goto err;
sc->debug.regidx = 0; sc->debug.regidx = 0;
return 0; return 0;
err:
debugfs_remove_recursive(sc->debug.debugfs_phy);
sc->debug.debugfs_phy = NULL;
return -ENOMEM;
} }
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