Skip to contentSkip to conversation

ath9k: Check for root debugfs file

PATCH In review Sujith 1 participant 1 message Mar 30, 2009 Networking drivers (wireless)

lore
Share & tools
lore

Sujith

author
#0 lore raw

PATCH 10/17 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.

---
 drivers/net/wireless/ath9k/debug.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/wireless/ath9k/debug.c +3 -0
index fdf9528..97df20c 100644
@@ -498,6 +498,9 @@ int ath9k_init_debug(struct ath_softc *sc)
 {
 	sc->debug.debug_mask = ath9k_debug;
 
+	if (!ath9k_debugfs_root)
+		return -ENOENT;
+
 	sc->debug.debugfs_phy = debugfs_create_dir(wiphy_name(sc->hw->wiphy),
 						      ath9k_debugfs_root);
 	if (!sc->debug.debugfs_phy)
Signature · 1 line
1.6.2.1