aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-03-30 05:58:42 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:54:34 -0400
commit7dd58748592db1e5a77cfbddb8beffcfdb0242fe (patch)
treee61b6c2ac1eb0dbee6a2e157cd611620d033fc44 /drivers
parent5cc93992cc4cf12ddfe63c8a5be2d509e6678e99 (diff)
ath9k: Check for root debugfs file
Creation of the root debugfs file could have failed for some reason, check properly before proceeding in this case. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath9k/debug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath9k/debug.c b/drivers/net/wireless/ath9k/debug.c
index fdf9528fa49b..97df20cbf528 100644
--- a/drivers/net/wireless/ath9k/debug.c
+++ b/drivers/net/wireless/ath9k/debug.c
@@ -498,6 +498,9 @@ int ath9k_init_debug(struct ath_softc *sc)
498{ 498{
499 sc->debug.debug_mask = ath9k_debug; 499 sc->debug.debug_mask = ath9k_debug;
500 500
501 if (!ath9k_debugfs_root)
502 return -ENOENT;
503
501 sc->debug.debugfs_phy = debugfs_create_dir(wiphy_name(sc->hw->wiphy), 504 sc->debug.debugfs_phy = debugfs_create_dir(wiphy_name(sc->hw->wiphy),
502 ath9k_debugfs_root); 505 ath9k_debugfs_root);
503 if (!sc->debug.debugfs_phy) 506 if (!sc->debug.debugfs_phy)