Skip to content

Commit

Permalink
ath9k: Check for root debugfs file
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujith authored and John W. Linville committed Apr 22, 2009
1 parent 5cc9399 commit 7dd5874
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/wireless/ath9k/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7dd5874

Please sign in to comment.