From: Sujith Date: Mon, 30 Mar 2009 09:58:42 +0000 (+0530) Subject: ath9k: Check for root debugfs file X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7dd58748592db1e5a77cfbddb8beffcfdb0242fe;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: John W. Linville --- 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) { 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)