瀏覽代碼

ath9k: Handle failure to allocate HW timer

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan 11 年之前
父節點
當前提交
4f6816913f
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/net/wireless/ath/ath9k/init.c

+ 3 - 1
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);