Skip to content
Snippets Groups Projects
Commit 9a996761 authored by Felix Fietkau's avatar Felix Fietkau
Browse files

ath9k: fix a crash in led init

SVN-Revision: 29558
parent 67c79802
No related branches found
No related tags found
No related merge requests found
...@@ -56,11 +56,14 @@ ...@@ -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]);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment