summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-12-16 23:41:44 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-12-16 23:41:44 +0000
commit9a996761b57bddf334cdd19b8a16111c44329079 (patch)
treed4086d5c0fe2ac5b0d12c10b42a52c44486ce4cb /package
parent67c7980290d77042de0157d7611da5a23cd643a3 (diff)
downloadmtk-20170518-9a996761b57bddf334cdd19b8a16111c44329079.zip
mtk-20170518-9a996761b57bddf334cdd19b8a16111c44329079.tar.gz
mtk-20170518-9a996761b57bddf334cdd19b8a16111c44329079.tar.bz2
ath9k: fix a crash in led init
SVN-Revision: 29558
Diffstat (limited to 'package')
-rw-r--r--package/mac80211/patches/581-ath9k_extra_platform_leds.patch5
1 files changed, 4 insertions, 1 deletions
diff --git a/package/mac80211/patches/581-ath9k_extra_platform_leds.patch b/package/mac80211/patches/581-ath9k_extra_platform_leds.patch
index 0637269..3834d43 100644
--- a/package/mac80211/patches/581-ath9k_extra_platform_leds.patch
+++ b/package/mac80211/patches/581-ath9k_extra_platform_leds.patch
@@ -56,11 +56,14 @@
INIT_LIST_HEAD(&sc->leds);
-@@ -133,6 +154,9 @@ void ath_init_leds(struct ath_softc *sc)
+@@ -133,6 +154,12 @@ void ath_init_leds(struct ath_softc *sc)
trigger = ieee80211_get_radio_led_name(sc->hw);
ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, 1);
+
++ if (!pdata)
++ return;
++
+ for (i = 0; i < pdata->num_leds; i++)
+ ath_create_platform_led(sc, &pdata->leds[i]);
}