diff options
Diffstat (limited to 'drivers/net/wireless/ath')
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 11 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 7 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.c | 12 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/wil6210/txrx.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/wil6210/wmi.c | 10 | 
5 files changed, 9 insertions, 33 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index b6a5a08810b..3ad1fd05c5e 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c @@ -1196,20 +1196,17 @@ void ath9k_rx_cleanup(struct ath9k_htc_priv *priv)  int ath9k_rx_init(struct ath9k_htc_priv *priv)  { -	struct ath_hw *ah = priv->ah; -	struct ath_common *common = ath9k_hw_common(ah); -	struct ath9k_htc_rxbuf *rxbuf;  	int i = 0;  	INIT_LIST_HEAD(&priv->rx.rxbuf);  	spin_lock_init(&priv->rx.rxbuflock);  	for (i = 0; i < ATH9K_HTC_RXBUF; i++) { -		rxbuf = kzalloc(sizeof(struct ath9k_htc_rxbuf), GFP_KERNEL); -		if (rxbuf == NULL) { -			ath_err(common, "Unable to allocate RX buffers\n"); +		struct ath9k_htc_rxbuf *rxbuf = +			kzalloc(sizeof(struct ath9k_htc_rxbuf), GFP_KERNEL); +		if (rxbuf == NULL)  			goto err; -		} +  		list_add_tail(&rxbuf->list, &priv->rx.rxbuf);  	} diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 42cf3c7f1e2..2a2ae403e0e 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -2981,13 +2981,8 @@ struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,  	struct ath_gen_timer *timer;  	timer = kzalloc(sizeof(struct ath_gen_timer), GFP_KERNEL); - -	if (timer == NULL) { -		ath_err(ath9k_hw_common(ah), -			"Failed to allocate memory for hw timer[%d]\n", -			timer_index); +	if (timer == NULL)  		return NULL; -	}  	/* allocate a hardware generic timer slot */  	timer_table->timers[timer_index] = timer; diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 714558d1ba7..faa752b95d5 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c @@ -1452,17 +1452,7 @@ static void ath_rate_free(void *priv)  static void *ath_rate_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp)  { -	struct ath_softc *sc = priv; -	struct ath_rate_priv *rate_priv; - -	rate_priv = kzalloc(sizeof(struct ath_rate_priv), gfp); -	if (!rate_priv) { -		ath_err(ath9k_hw_common(sc->sc_ah), -			"Unable to allocate private rc structure\n"); -		return NULL; -	} - -	return rate_priv; +	return kzalloc(sizeof(struct ath_rate_priv), gfp);  }  static void ath_rate_free_sta(void *priv, struct ieee80211_sta *sta, diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index 64b971fdc3c..d1315b44237 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -74,8 +74,6 @@ static int wil_vring_alloc(struct wil6210_priv *wil, struct vring *vring)  	vring->swtail = 0;  	vring->ctx = kzalloc(vring->size * sizeof(vring->ctx[0]), GFP_KERNEL);  	if (!vring->ctx) { -		wil_err(wil, "vring_alloc [%d] failed to alloc ctx mem\n", -			vring->size);  		vring->va = NULL;  		return -ENOMEM;  	} diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 0b70e17cd1f..c8aca3d5008 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c @@ -587,11 +587,9 @@ void wmi_recv_cmd(struct wil6210_priv *wil)  		evt = kmalloc(ALIGN(offsetof(struct pending_wmi_event,  					     event.wmi) + len, 4),  			      GFP_KERNEL); -		if (!evt) { -			wil_err(wil, "kmalloc for WMI event (%d) failed\n", -				len); +		if (!evt)  			return; -		} +  		evt->event.hdr = hdr;  		cmd = (void *)&evt->event.wmi;  		wil_memcpy_fromio_32(cmd, src, len); @@ -838,10 +836,8 @@ int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie)  	int rc;  	u16 len = sizeof(struct wmi_set_appie_cmd) + ie_len;  	struct wmi_set_appie_cmd *cmd = kzalloc(len, GFP_KERNEL); -	if (!cmd) { -		wil_err(wil, "kmalloc(%d) failed\n", len); +	if (!cmd)  		return -ENOMEM; -	}  	cmd->mgmt_frm_type = type;  	/* BUG: FW API define ieLen as u8. Will fix FW */  |