From: Sujith Manoharan Date: Fri, 22 Aug 2014 15:09:25 +0000 (+0530) Subject: ath9k: Handle failure to allocate HW timer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4f6816913f5e0bc4c983674a14a08c6e3729b449;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ath9k: Handle failure to allocate HW timer Signed-off-by: Sujith Manoharan Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 76771f37aa86..4219e7bd4759 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -601,7 +601,9 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, goto err_btcoex; sc->p2p_ps_timer = ath_gen_timer_alloc(sc->sc_ah, ath9k_p2p_ps_timer, - NULL, sc, AR_FIRST_NDP_TIMER); + NULL, sc, AR_FIRST_NDP_TIMER); + if (!sc->p2p_ps_timer) + goto err_btcoex; ath9k_cmn_init_crypto(sc->sc_ah); ath9k_init_misc(sc);