aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches
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
commit15f4ea544ba011397f83e77e0570d8a4f1f2a99d (patch)
tree3d6bb9c517ba322dd9c07049837949e672fd2876 /package/mac80211/patches
parente5d5ffcbc26c308f6b3cf5506c5161e4a67a45a3 (diff)
downloadupstream-15f4ea544ba011397f83e77e0570d8a4f1f2a99d.tar.gz
upstream-15f4ea544ba011397f83e77e0570d8a4f1f2a99d.tar.bz2
upstream-15f4ea544ba011397f83e77e0570d8a4f1f2a99d.zip
ath9k: fix a crash in led init
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29558 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches')
-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 0637269b34..3834d43881 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]);
}