1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-30 19:43:09 +02:00

ath9k: fix a crash in led init

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29558 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2011-12-16 23:41:44 +00:00
parent 12930c3272
commit de50d6624f

View File

@ -56,11 +56,14 @@
INIT_LIST_HEAD(&sc->leds); 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); trigger = ieee80211_get_radio_led_name(sc->hw);
ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, 1); 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++) + for (i = 0; i < pdata->num_leds; i++)
+ ath_create_platform_led(sc, &pdata->leds[i]); + ath_create_platform_led(sc, &pdata->leds[i]);
} }