aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/airo_cs.c5
-rw-r--r--drivers/net/wireless/at76c50x-usb.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/dfs_pattern_detector.c6
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_init.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_txrx.c11
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c7
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.c12
-rw-r--r--drivers/net/wireless/ath/wil6210/txrx.c2
-rw-r--r--drivers/net/wireless/ath/wil6210/wmi.c10
-rw-r--r--drivers/net/wireless/atmel_cs.c5
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c8
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c5
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/usb.c7
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2100.c9
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2200.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-fw.h2
-rw-r--r--drivers/net/wireless/libertas/cfg.c4
-rw-r--r--drivers/net/wireless/mwifiex/11n.c5
-rw-r--r--drivers/net/wireless/mwifiex/11n_rxreorder.c5
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c5
-rw-r--r--drivers/net/wireless/mwifiex/cmdevt.c11
-rw-r--r--drivers/net/wireless/mwifiex/init.c5
-rw-r--r--drivers/net/wireless/mwifiex/scan.c27
-rw-r--r--drivers/net/wireless/mwifiex/sdio.c11
-rw-r--r--drivers/net/wireless/mwifiex/sta_ioctl.c11
-rw-r--r--drivers/net/wireless/mwifiex/wmm.c7
-rw-r--r--drivers/net/wireless/orinoco/main.c17
-rw-r--r--drivers/net/wireless/p54/p54usb.c10
-rw-r--r--drivers/net/wireless/prism54/islpci_mgt.c14
-rw-r--r--drivers/net/wireless/rndis_wlan.c5
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723ae/sw.c2
-rw-r--r--drivers/net/wireless/ti/wlcore/wlcore_i.h4
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c1
33 files changed, 70 insertions, 170 deletions
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 630577dd3a7a..956024a636e6 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -69,10 +69,9 @@ static int airo_probe(struct pcmcia_device *p_dev)
69 69
70 /* Allocate space for private device-specific data */ 70 /* Allocate space for private device-specific data */
71 local = kzalloc(sizeof(local_info_t), GFP_KERNEL); 71 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
72 if (!local) { 72 if (!local)
73 printk(KERN_ERR "airo_cs: no memory for new device\n");
74 return -ENOMEM; 73 return -ENOMEM;
75 } 74
76 p_dev->priv = local; 75 p_dev->priv = local;
77 76
78 return airo_config(p_dev); 77 return airo_config(p_dev);
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index 77fa4286e5e9..5ac5f7ae2721 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -2164,10 +2164,8 @@ static int at76_alloc_urbs(struct at76_priv *priv,
2164 2164
2165 buffer_size = sizeof(struct at76_tx_buffer) + MAX_PADDING_SIZE; 2165 buffer_size = sizeof(struct at76_tx_buffer) + MAX_PADDING_SIZE;
2166 priv->bulk_out_buffer = kmalloc(buffer_size, GFP_KERNEL); 2166 priv->bulk_out_buffer = kmalloc(buffer_size, GFP_KERNEL);
2167 if (!priv->bulk_out_buffer) { 2167 if (!priv->bulk_out_buffer)
2168 dev_err(&interface->dev, "cannot allocate output buffer\n");
2169 return -ENOMEM; 2168 return -ENOMEM;
2170 }
2171 2169
2172 at76_dbg(DBG_PROC_ENTRY, "%s: EXIT", __func__); 2170 at76_dbg(DBG_PROC_ENTRY, "%s: EXIT", __func__);
2173 2171
diff --git a/drivers/net/wireless/ath/ath9k/dfs_pattern_detector.c b/drivers/net/wireless/ath/ath9k/dfs_pattern_detector.c
index 24877b00cbf4..467b60014b7b 100644
--- a/drivers/net/wireless/ath/ath9k/dfs_pattern_detector.c
+++ b/drivers/net/wireless/ath/ath9k/dfs_pattern_detector.c
@@ -288,11 +288,11 @@ struct dfs_pattern_detector *
288dfs_pattern_detector_init(enum nl80211_dfs_regions region) 288dfs_pattern_detector_init(enum nl80211_dfs_regions region)
289{ 289{
290 struct dfs_pattern_detector *dpd; 290 struct dfs_pattern_detector *dpd;
291
291 dpd = kmalloc(sizeof(*dpd), GFP_KERNEL); 292 dpd = kmalloc(sizeof(*dpd), GFP_KERNEL);
292 if (dpd == NULL) { 293 if (dpd == NULL)
293 pr_err("allocation of dfs_pattern_detector failed\n");
294 return NULL; 294 return NULL;
295 } 295
296 *dpd = default_dpd; 296 *dpd = default_dpd;
297 INIT_LIST_HEAD(&dpd->channel_detectors); 297 INIT_LIST_HEAD(&dpd->channel_detectors);
298 298
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index e5d7958ab948..716058b67557 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -783,7 +783,7 @@ static int ath9k_init_firmware_version(struct ath9k_htc_priv *priv)
783 priv->fw_version_major = be16_to_cpu(cmd_rsp.major); 783 priv->fw_version_major = be16_to_cpu(cmd_rsp.major);
784 priv->fw_version_minor = be16_to_cpu(cmd_rsp.minor); 784 priv->fw_version_minor = be16_to_cpu(cmd_rsp.minor);
785 785
786 snprintf(hw->wiphy->fw_version, ETHTOOL_BUSINFO_LEN, "%d.%d", 786 snprintf(hw->wiphy->fw_version, sizeof(hw->wiphy->fw_version), "%d.%d",
787 priv->fw_version_major, 787 priv->fw_version_major,
788 priv->fw_version_minor); 788 priv->fw_version_minor);
789 789
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index b6a5a08810b8..3ad1fd05c5e7 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)
1196 1196
1197int ath9k_rx_init(struct ath9k_htc_priv *priv) 1197int ath9k_rx_init(struct ath9k_htc_priv *priv)
1198{ 1198{
1199 struct ath_hw *ah = priv->ah;
1200 struct ath_common *common = ath9k_hw_common(ah);
1201 struct ath9k_htc_rxbuf *rxbuf;
1202 int i = 0; 1199 int i = 0;
1203 1200
1204 INIT_LIST_HEAD(&priv->rx.rxbuf); 1201 INIT_LIST_HEAD(&priv->rx.rxbuf);
1205 spin_lock_init(&priv->rx.rxbuflock); 1202 spin_lock_init(&priv->rx.rxbuflock);
1206 1203
1207 for (i = 0; i < ATH9K_HTC_RXBUF; i++) { 1204 for (i = 0; i < ATH9K_HTC_RXBUF; i++) {
1208 rxbuf = kzalloc(sizeof(struct ath9k_htc_rxbuf), GFP_KERNEL); 1205 struct ath9k_htc_rxbuf *rxbuf =
1209 if (rxbuf == NULL) { 1206 kzalloc(sizeof(struct ath9k_htc_rxbuf), GFP_KERNEL);
1210 ath_err(common, "Unable to allocate RX buffers\n"); 1207 if (rxbuf == NULL)
1211 goto err; 1208 goto err;
1212 } 1209
1213 list_add_tail(&rxbuf->list, &priv->rx.rxbuf); 1210 list_add_tail(&rxbuf->list, &priv->rx.rxbuf);
1214 } 1211 }
1215 1212
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 42cf3c7f1e25..2a2ae403e0e5 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,
2981 struct ath_gen_timer *timer; 2981 struct ath_gen_timer *timer;
2982 2982
2983 timer = kzalloc(sizeof(struct ath_gen_timer), GFP_KERNEL); 2983 timer = kzalloc(sizeof(struct ath_gen_timer), GFP_KERNEL);
2984 2984 if (timer == NULL)
2985 if (timer == NULL) {
2986 ath_err(ath9k_hw_common(ah),
2987 "Failed to allocate memory for hw timer[%d]\n",
2988 timer_index);
2989 return NULL; 2985 return NULL;
2990 }
2991 2986
2992 /* allocate a hardware generic timer slot */ 2987 /* allocate a hardware generic timer slot */
2993 timer_table->timers[timer_index] = timer; 2988 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 54150b6a39ae..96ac433ba7f6 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)
1452 1452
1453static void *ath_rate_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp) 1453static void *ath_rate_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp)
1454{ 1454{
1455 struct ath_softc *sc = priv; 1455 return kzalloc(sizeof(struct ath_rate_priv), gfp);
1456 struct ath_rate_priv *rate_priv;
1457
1458 rate_priv = kzalloc(sizeof(struct ath_rate_priv), gfp);
1459 if (!rate_priv) {
1460 ath_err(ath9k_hw_common(sc->sc_ah),
1461 "Unable to allocate private rc structure\n");
1462 return NULL;
1463 }
1464
1465 return rate_priv;
1466} 1456}
1467 1457
1468static void ath_rate_free_sta(void *priv, struct ieee80211_sta *sta, 1458static 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 64b971fdc3cc..d1315b442375 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)
74 vring->swtail = 0; 74 vring->swtail = 0;
75 vring->ctx = kzalloc(vring->size * sizeof(vring->ctx[0]), GFP_KERNEL); 75 vring->ctx = kzalloc(vring->size * sizeof(vring->ctx[0]), GFP_KERNEL);
76 if (!vring->ctx) { 76 if (!vring->ctx) {
77 wil_err(wil, "vring_alloc [%d] failed to alloc ctx mem\n",
78 vring->size);
79 vring->va = NULL; 77 vring->va = NULL;
80 return -ENOMEM; 78 return -ENOMEM;
81 } 79 }
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c
index 79d608caa903..0bb3b76b4b58 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)
587 evt = kmalloc(ALIGN(offsetof(struct pending_wmi_event, 587 evt = kmalloc(ALIGN(offsetof(struct pending_wmi_event,
588 event.wmi) + len, 4), 588 event.wmi) + len, 4),
589 GFP_KERNEL); 589 GFP_KERNEL);
590 if (!evt) { 590 if (!evt)
591 wil_err(wil, "kmalloc for WMI event (%d) failed\n",
592 len);
593 return; 591 return;
594 } 592
595 evt->event.hdr = hdr; 593 evt->event.hdr = hdr;
596 cmd = (void *)&evt->event.wmi; 594 cmd = (void *)&evt->event.wmi;
597 wil_memcpy_fromio_32(cmd, src, len); 595 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)
838 int rc; 836 int rc;
839 u16 len = sizeof(struct wmi_set_appie_cmd) + ie_len; 837 u16 len = sizeof(struct wmi_set_appie_cmd) + ie_len;
840 struct wmi_set_appie_cmd *cmd = kzalloc(len, GFP_KERNEL); 838 struct wmi_set_appie_cmd *cmd = kzalloc(len, GFP_KERNEL);
841 if (!cmd) { 839 if (!cmd)
842 wil_err(wil, "kmalloc(%d) failed\n", len);
843 return -ENOMEM; 840 return -ENOMEM;
844 }
845 841
846 cmd->mgmt_frm_type = type; 842 cmd->mgmt_frm_type = type;
847 /* BUG: FW API define ieLen as u8. Will fix FW */ 843 /* BUG: FW API define ieLen as u8. Will fix FW */
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index ded03d226a71..b42930f457c2 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -79,10 +79,9 @@ static int atmel_probe(struct pcmcia_device *p_dev)
79 79
80 /* Allocate space for private device-specific data */ 80 /* Allocate space for private device-specific data */
81 local = kzalloc(sizeof(local_info_t), GFP_KERNEL); 81 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
82 if (!local) { 82 if (!local)
83 printk(KERN_ERR "atmel_cs: no memory for new device\n");
84 return -ENOMEM; 83 return -ENOMEM;
85 } 84
86 p_dev->priv = local; 85 p_dev->priv = local;
87 86
88 return atmel_config(p_dev); 87 return atmel_config(p_dev);
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index 6e3846ca88be..c06cea88df0d 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -413,9 +413,11 @@ static void brcmf_ethtool_get_drvinfo(struct net_device *ndev,
413 struct brcmf_if *ifp = netdev_priv(ndev); 413 struct brcmf_if *ifp = netdev_priv(ndev);
414 struct brcmf_pub *drvr = ifp->drvr; 414 struct brcmf_pub *drvr = ifp->drvr;
415 415
416 sprintf(info->driver, KBUILD_MODNAME); 416 strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
417 sprintf(info->version, "%lu", drvr->drv_version); 417 snprintf(info->version, sizeof(info->version), "%lu",
418 sprintf(info->bus_info, "%s", dev_name(drvr->bus_if->dev)); 418 drvr->drv_version);
419 strlcpy(info->bus_info, dev_name(drvr->bus_if->dev),
420 sizeof(info->bus_info));
419} 421}
420 422
421static const struct ethtool_ops brcmf_ethtool_ops = { 423static const struct ethtool_ops brcmf_ethtool_ops = {
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
index 35817631ea06..4469321c0eb3 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
@@ -1443,10 +1443,9 @@ brcmf_sdbrcm_read_control(struct brcmf_sdio *bus, u8 *hdr, uint len, uint doff)
1443 1443
1444 if (bus->rxblen) 1444 if (bus->rxblen)
1445 buf = vzalloc(bus->rxblen); 1445 buf = vzalloc(bus->rxblen);
1446 if (!buf) { 1446 if (!buf)
1447 brcmf_err("no memory for control frame\n");
1448 goto done; 1447 goto done;
1449 } 1448
1450 rbuf = bus->rxbuf; 1449 rbuf = bus->rxbuf;
1451 pad = ((unsigned long)rbuf % BRCMF_SDALIGN); 1450 pad = ((unsigned long)rbuf % BRCMF_SDALIGN);
1452 if (pad) 1451 if (pad)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
index a55994d33763..42289e9ea886 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
@@ -354,11 +354,10 @@ brcmf_usbdev_qinit(struct list_head *q, int qsize)
354 int i; 354 int i;
355 struct brcmf_usbreq *req, *reqs; 355 struct brcmf_usbreq *req, *reqs;
356 356
357 reqs = kzalloc(sizeof(struct brcmf_usbreq) * qsize, GFP_ATOMIC); 357 reqs = kcalloc(qsize, sizeof(struct brcmf_usbreq), GFP_ATOMIC);
358 if (reqs == NULL) { 358 if (reqs == NULL)
359 brcmf_err("fail to allocate memory!\n");
360 return NULL; 359 return NULL;
361 } 360
362 req = reqs; 361 req = reqs;
363 362
364 for (i = 0; i < qsize; i++) { 363 for (i = 0; i < qsize; i++) {
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index d92b21a8e597..04d5e6442bf6 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -4478,13 +4478,10 @@ static int ipw2100_tx_allocate(struct ipw2100_priv *priv)
4478 return err; 4478 return err;
4479 } 4479 }
4480 4480
4481 priv->tx_buffers = 4481 priv->tx_buffers = kmalloc_array(TX_PENDED_QUEUE_LENGTH,
4482 kmalloc(TX_PENDED_QUEUE_LENGTH * sizeof(struct ipw2100_tx_packet), 4482 sizeof(struct ipw2100_tx_packet),
4483 GFP_ATOMIC); 4483 GFP_ATOMIC);
4484 if (!priv->tx_buffers) { 4484 if (!priv->tx_buffers) {
4485 printk(KERN_ERR DRV_NAME
4486 ": %s: alloc failed form tx buffers.\n",
4487 priv->net_dev->name);
4488 bd_queue_free(priv, &priv->tx_queue); 4485 bd_queue_free(priv, &priv->tx_queue);
4489 return -ENOMEM; 4486 return -ENOMEM;
4490 } 4487 }
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index 844f201b7b70..3e824b8fa83d 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -11327,7 +11327,6 @@ static int ipw_up(struct ipw_priv *priv)
11327 if (!(priv->config & CFG_CUSTOM_MAC)) 11327 if (!(priv->config & CFG_CUSTOM_MAC))
11328 eeprom_parse_mac(priv, priv->mac_addr); 11328 eeprom_parse_mac(priv, priv->mac_addr);
11329 memcpy(priv->net_dev->dev_addr, priv->mac_addr, ETH_ALEN); 11329 memcpy(priv->net_dev->dev_addr, priv->mac_addr, ETH_ALEN);
11330 memcpy(priv->net_dev->perm_addr, priv->mac_addr, ETH_ALEN);
11331 11330
11332 ipw_set_geo(priv); 11331 ipw_set_geo(priv);
11333 11332
diff --git a/drivers/net/wireless/iwlwifi/iwl-fw.h b/drivers/net/wireless/iwlwifi/iwl-fw.h
index de3c24a5a620..b545178e46e3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-fw.h
+++ b/drivers/net/wireless/iwlwifi/iwl-fw.h
@@ -171,7 +171,7 @@ struct iwl_tlv_calib_ctrl {
171struct iwl_fw { 171struct iwl_fw {
172 u32 ucode_ver; 172 u32 ucode_ver;
173 173
174 char fw_version[ETHTOOL_BUSINFO_LEN]; 174 char fw_version[ETHTOOL_FWVERS_LEN];
175 175
176 /* ucode images */ 176 /* ucode images */
177 struct fw_img img[IWL_UCODE_TYPE_MAX]; 177 struct fw_img img[IWL_UCODE_TYPE_MAX];
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 61735db3b051..116f4aba08d6 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -2081,10 +2081,8 @@ struct wireless_dev *lbs_cfg_alloc(struct device *dev)
2081 lbs_deb_enter(LBS_DEB_CFG80211); 2081 lbs_deb_enter(LBS_DEB_CFG80211);
2082 2082
2083 wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); 2083 wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL);
2084 if (!wdev) { 2084 if (!wdev)
2085 dev_err(dev, "cannot allocate wireless device\n");
2086 return ERR_PTR(-ENOMEM); 2085 return ERR_PTR(-ENOMEM);
2087 }
2088 2086
2089 wdev->wiphy = wiphy_new(&lbs_cfg80211_ops, sizeof(struct lbs_private)); 2087 wdev->wiphy = wiphy_new(&lbs_cfg80211_ops, sizeof(struct lbs_private));
2090 if (!wdev->wiphy) { 2088 if (!wdev->wiphy) {
diff --git a/drivers/net/wireless/mwifiex/11n.c b/drivers/net/wireless/mwifiex/11n.c
index 48cc46bc152f..25596ab0c576 100644
--- a/drivers/net/wireless/mwifiex/11n.c
+++ b/drivers/net/wireless/mwifiex/11n.c
@@ -494,11 +494,8 @@ void mwifiex_create_ba_tbl(struct mwifiex_private *priv, u8 *ra, int tid,
494 if (!mwifiex_get_ba_tbl(priv, tid, ra)) { 494 if (!mwifiex_get_ba_tbl(priv, tid, ra)) {
495 new_node = kzalloc(sizeof(struct mwifiex_tx_ba_stream_tbl), 495 new_node = kzalloc(sizeof(struct mwifiex_tx_ba_stream_tbl),
496 GFP_ATOMIC); 496 GFP_ATOMIC);
497 if (!new_node) { 497 if (!new_node)
498 dev_err(priv->adapter->dev,
499 "%s: failed to alloc new_node\n", __func__);
500 return; 498 return;
501 }
502 499
503 INIT_LIST_HEAD(&new_node->list); 500 INIT_LIST_HEAD(&new_node->list);
504 501
diff --git a/drivers/net/wireless/mwifiex/11n_rxreorder.c b/drivers/net/wireless/mwifiex/11n_rxreorder.c
index 4a97acd170f7..5e796f847088 100644
--- a/drivers/net/wireless/mwifiex/11n_rxreorder.c
+++ b/drivers/net/wireless/mwifiex/11n_rxreorder.c
@@ -272,11 +272,8 @@ mwifiex_11n_create_rx_reorder_tbl(struct mwifiex_private *priv, u8 *ta,
272 } 272 }
273 /* if !tbl then create one */ 273 /* if !tbl then create one */
274 new_node = kzalloc(sizeof(struct mwifiex_rx_reorder_tbl), GFP_KERNEL); 274 new_node = kzalloc(sizeof(struct mwifiex_rx_reorder_tbl), GFP_KERNEL);
275 if (!new_node) { 275 if (!new_node)
276 dev_err(priv->adapter->dev, "%s: failed to alloc new_node\n",
277 __func__);
278 return; 276 return;
279 }
280 277
281 INIT_LIST_HEAD(&new_node->list); 278 INIT_LIST_HEAD(&new_node->list);
282 new_node->tid = tid; 279 new_node->tid = tid;
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 81c84a29308f..dc5357c0098f 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1820,10 +1820,8 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
1820 1820
1821 priv->user_scan_cfg = kzalloc(sizeof(struct mwifiex_user_scan_cfg), 1821 priv->user_scan_cfg = kzalloc(sizeof(struct mwifiex_user_scan_cfg),
1822 GFP_KERNEL); 1822 GFP_KERNEL);
1823 if (!priv->user_scan_cfg) { 1823 if (!priv->user_scan_cfg)
1824 dev_err(priv->adapter->dev, "failed to alloc scan_req\n");
1825 return -ENOMEM; 1824 return -ENOMEM;
1826 }
1827 1825
1828 priv->scan_request = request; 1826 priv->scan_request = request;
1829 1827
@@ -2103,7 +2101,6 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy,
2103 dev->ieee80211_ptr = priv->wdev; 2101 dev->ieee80211_ptr = priv->wdev;
2104 dev->ieee80211_ptr->iftype = priv->bss_mode; 2102 dev->ieee80211_ptr->iftype = priv->bss_mode;
2105 memcpy(dev->dev_addr, wiphy->perm_addr, ETH_ALEN); 2103 memcpy(dev->dev_addr, wiphy->perm_addr, ETH_ALEN);
2106 memcpy(dev->perm_addr, wiphy->perm_addr, ETH_ALEN);
2107 SET_NETDEV_DEV(dev, wiphy_dev(wiphy)); 2104 SET_NETDEV_DEV(dev, wiphy_dev(wiphy));
2108 2105
2109 dev->flags |= IFF_BROADCAST | IFF_MULTICAST; 2106 dev->flags |= IFF_BROADCAST | IFF_MULTICAST;
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c
index 5f438e6c2155..2b125beecf2c 100644
--- a/drivers/net/wireless/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/mwifiex/cmdevt.c
@@ -334,20 +334,15 @@ static int mwifiex_dnld_sleep_confirm_cmd(struct mwifiex_adapter *adapter)
334int mwifiex_alloc_cmd_buffer(struct mwifiex_adapter *adapter) 334int mwifiex_alloc_cmd_buffer(struct mwifiex_adapter *adapter)
335{ 335{
336 struct cmd_ctrl_node *cmd_array; 336 struct cmd_ctrl_node *cmd_array;
337 u32 buf_size;
338 u32 i; 337 u32 i;
339 338
340 /* Allocate and initialize struct cmd_ctrl_node */ 339 /* Allocate and initialize struct cmd_ctrl_node */
341 buf_size = sizeof(struct cmd_ctrl_node) * MWIFIEX_NUM_OF_CMD_BUFFER; 340 cmd_array = kcalloc(MWIFIEX_NUM_OF_CMD_BUFFER,
342 cmd_array = kzalloc(buf_size, GFP_KERNEL); 341 sizeof(struct cmd_ctrl_node), GFP_KERNEL);
343 if (!cmd_array) { 342 if (!cmd_array)
344 dev_err(adapter->dev, "%s: failed to alloc cmd_array\n",
345 __func__);
346 return -ENOMEM; 343 return -ENOMEM;
347 }
348 344
349 adapter->cmd_pool = cmd_array; 345 adapter->cmd_pool = cmd_array;
350 memset(adapter->cmd_pool, 0, buf_size);
351 346
352 /* Allocate and initialize command buffers */ 347 /* Allocate and initialize command buffers */
353 for (i = 0; i < MWIFIEX_NUM_OF_CMD_BUFFER; i++) { 348 for (i = 0; i < MWIFIEX_NUM_OF_CMD_BUFFER; i++) {
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index 820a19cfa562..e38aa9b3663d 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -39,11 +39,8 @@ static int mwifiex_add_bss_prio_tbl(struct mwifiex_private *priv)
39 unsigned long flags; 39 unsigned long flags;
40 40
41 bss_prio = kzalloc(sizeof(struct mwifiex_bss_prio_node), GFP_KERNEL); 41 bss_prio = kzalloc(sizeof(struct mwifiex_bss_prio_node), GFP_KERNEL);
42 if (!bss_prio) { 42 if (!bss_prio)
43 dev_err(adapter->dev, "%s: failed to alloc bss_prio\n",
44 __func__);
45 return -ENOMEM; 43 return -ENOMEM;
46 }
47 44
48 bss_prio->priv = priv; 45 bss_prio->priv = priv;
49 INIT_LIST_HEAD(&bss_prio->list); 46 INIT_LIST_HEAD(&bss_prio->list);
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 949234fcf8c6..e0cce1b52d55 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -1309,7 +1309,6 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
1309 struct cmd_ctrl_node *cmd_node; 1309 struct cmd_ctrl_node *cmd_node;
1310 union mwifiex_scan_cmd_config_tlv *scan_cfg_out; 1310 union mwifiex_scan_cmd_config_tlv *scan_cfg_out;
1311 struct mwifiex_ie_types_chan_list_param_set *chan_list_out; 1311 struct mwifiex_ie_types_chan_list_param_set *chan_list_out;
1312 u32 buf_size;
1313 struct mwifiex_chan_scan_param_set *scan_chan_list; 1312 struct mwifiex_chan_scan_param_set *scan_chan_list;
1314 u8 filtered_scan; 1313 u8 filtered_scan;
1315 u8 scan_current_chan_only; 1314 u8 scan_current_chan_only;
@@ -1332,18 +1331,16 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
1332 spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, flags); 1331 spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, flags);
1333 1332
1334 scan_cfg_out = kzalloc(sizeof(union mwifiex_scan_cmd_config_tlv), 1333 scan_cfg_out = kzalloc(sizeof(union mwifiex_scan_cmd_config_tlv),
1335 GFP_KERNEL); 1334 GFP_KERNEL);
1336 if (!scan_cfg_out) { 1335 if (!scan_cfg_out) {
1337 dev_err(adapter->dev, "failed to alloc scan_cfg_out\n");
1338 ret = -ENOMEM; 1336 ret = -ENOMEM;
1339 goto done; 1337 goto done;
1340 } 1338 }
1341 1339
1342 buf_size = sizeof(struct mwifiex_chan_scan_param_set) * 1340 scan_chan_list = kcalloc(MWIFIEX_USER_SCAN_CHAN_MAX,
1343 MWIFIEX_USER_SCAN_CHAN_MAX; 1341 sizeof(struct mwifiex_chan_scan_param_set),
1344 scan_chan_list = kzalloc(buf_size, GFP_KERNEL); 1342 GFP_KERNEL);
1345 if (!scan_chan_list) { 1343 if (!scan_chan_list) {
1346 dev_err(adapter->dev, "failed to alloc scan_chan_list\n");
1347 kfree(scan_cfg_out); 1344 kfree(scan_cfg_out);
1348 ret = -ENOMEM; 1345 ret = -ENOMEM;
1349 goto done; 1346 goto done;
@@ -1461,12 +1458,9 @@ static int mwifiex_update_curr_bss_params(struct mwifiex_private *priv,
1461 unsigned long flags; 1458 unsigned long flags;
1462 1459
1463 /* Allocate and fill new bss descriptor */ 1460 /* Allocate and fill new bss descriptor */
1464 bss_desc = kzalloc(sizeof(struct mwifiex_bssdescriptor), 1461 bss_desc = kzalloc(sizeof(struct mwifiex_bssdescriptor), GFP_KERNEL);
1465 GFP_KERNEL); 1462 if (!bss_desc)
1466 if (!bss_desc) {
1467 dev_err(priv->adapter->dev, " failed to alloc bss_desc\n");
1468 return -ENOMEM; 1463 return -ENOMEM;
1469 }
1470 1464
1471 ret = mwifiex_fill_new_bss_desc(priv, bss, bss_desc); 1465 ret = mwifiex_fill_new_bss_desc(priv, bss, bss_desc);
1472 if (ret) 1466 if (ret)
@@ -1880,10 +1874,8 @@ static int mwifiex_scan_specific_ssid(struct mwifiex_private *priv,
1880 } 1874 }
1881 1875
1882 scan_cfg = kzalloc(sizeof(struct mwifiex_user_scan_cfg), GFP_KERNEL); 1876 scan_cfg = kzalloc(sizeof(struct mwifiex_user_scan_cfg), GFP_KERNEL);
1883 if (!scan_cfg) { 1877 if (!scan_cfg)
1884 dev_err(adapter->dev, "failed to alloc scan_cfg\n");
1885 return -ENOMEM; 1878 return -ENOMEM;
1886 }
1887 1879
1888 scan_cfg->ssid_list = req_ssid; 1880 scan_cfg->ssid_list = req_ssid;
1889 scan_cfg->num_ssids = 1; 1881 scan_cfg->num_ssids = 1;
@@ -1997,11 +1989,8 @@ mwifiex_save_curr_bcn(struct mwifiex_private *priv)
1997 kfree(priv->curr_bcn_buf); 1989 kfree(priv->curr_bcn_buf);
1998 priv->curr_bcn_buf = kmalloc(curr_bss->beacon_buf_size, 1990 priv->curr_bcn_buf = kmalloc(curr_bss->beacon_buf_size,
1999 GFP_ATOMIC); 1991 GFP_ATOMIC);
2000 if (!priv->curr_bcn_buf) { 1992 if (!priv->curr_bcn_buf)
2001 dev_err(priv->adapter->dev,
2002 "failed to alloc curr_bcn_buf\n");
2003 return; 1993 return;
2004 }
2005 } 1994 }
2006 1995
2007 memcpy(priv->curr_bcn_buf, curr_bss->beacon_buf, 1996 memcpy(priv->curr_bcn_buf, curr_bss->beacon_buf,
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
index e35b67a9e6a6..d3fb9a14580a 100644
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
@@ -716,11 +716,8 @@ static int mwifiex_prog_fw_w_helper(struct mwifiex_adapter *adapter,
716 716
717 /* Assume that the allocated buffer is 8-byte aligned */ 717 /* Assume that the allocated buffer is 8-byte aligned */
718 fwbuf = kzalloc(MWIFIEX_UPLD_SIZE, GFP_KERNEL); 718 fwbuf = kzalloc(MWIFIEX_UPLD_SIZE, GFP_KERNEL);
719 if (!fwbuf) { 719 if (!fwbuf)
720 dev_err(adapter->dev,
721 "unable to alloc buffer for FW. Terminating dnld\n");
722 return -ENOMEM; 720 return -ENOMEM;
723 }
724 721
725 /* Perform firmware data transfer */ 722 /* Perform firmware data transfer */
726 do { 723 do {
@@ -1518,7 +1515,6 @@ static int mwifiex_alloc_sdio_mpa_buffers(struct mwifiex_adapter *adapter,
1518 1515
1519 card->mpa_tx.buf = kzalloc(mpa_tx_buf_size, GFP_KERNEL); 1516 card->mpa_tx.buf = kzalloc(mpa_tx_buf_size, GFP_KERNEL);
1520 if (!card->mpa_tx.buf) { 1517 if (!card->mpa_tx.buf) {
1521 dev_err(adapter->dev, "could not alloc buffer for MP-A TX\n");
1522 ret = -1; 1518 ret = -1;
1523 goto error; 1519 goto error;
1524 } 1520 }
@@ -1527,7 +1523,6 @@ static int mwifiex_alloc_sdio_mpa_buffers(struct mwifiex_adapter *adapter,
1527 1523
1528 card->mpa_rx.buf = kzalloc(mpa_rx_buf_size, GFP_KERNEL); 1524 card->mpa_rx.buf = kzalloc(mpa_rx_buf_size, GFP_KERNEL);
1529 if (!card->mpa_rx.buf) { 1525 if (!card->mpa_rx.buf) {
1530 dev_err(adapter->dev, "could not alloc buffer for MP-A RX\n");
1531 ret = -1; 1526 ret = -1;
1532 goto error; 1527 goto error;
1533 } 1528 }
@@ -1680,10 +1675,8 @@ static int mwifiex_init_sdio(struct mwifiex_adapter *adapter)
1680 1675
1681 /* Allocate buffers for SDIO MP-A */ 1676 /* Allocate buffers for SDIO MP-A */
1682 card->mp_regs = kzalloc(MAX_MP_REGS, GFP_KERNEL); 1677 card->mp_regs = kzalloc(MAX_MP_REGS, GFP_KERNEL);
1683 if (!card->mp_regs) { 1678 if (!card->mp_regs)
1684 dev_err(adapter->dev, "failed to alloc mp_regs\n");
1685 return -ENOMEM; 1679 return -ENOMEM;
1686 }
1687 1680
1688 ret = mwifiex_alloc_sdio_mpa_buffers(adapter, 1681 ret = mwifiex_alloc_sdio_mpa_buffers(adapter,
1689 SDIO_MP_TX_AGGR_DEF_BUF_SIZE, 1682 SDIO_MP_TX_AGGR_DEF_BUF_SIZE,
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index 0d018460daf9..7eef74564a92 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -261,11 +261,9 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
261 261
262 /* Allocate and fill new bss descriptor */ 262 /* Allocate and fill new bss descriptor */
263 bss_desc = kzalloc(sizeof(struct mwifiex_bssdescriptor), 263 bss_desc = kzalloc(sizeof(struct mwifiex_bssdescriptor),
264 GFP_KERNEL); 264 GFP_KERNEL);
265 if (!bss_desc) { 265 if (!bss_desc)
266 dev_err(priv->adapter->dev, " failed to alloc bss_desc\n");
267 return -ENOMEM; 266 return -ENOMEM;
268 }
269 267
270 ret = mwifiex_fill_new_bss_desc(priv, bss, bss_desc); 268 ret = mwifiex_fill_new_bss_desc(priv, bss, bss_desc);
271 if (ret) 269 if (ret)
@@ -631,11 +629,8 @@ int mwifiex_set_tx_power(struct mwifiex_private *priv,
631 } 629 }
632 } 630 }
633 buf = kzalloc(MWIFIEX_SIZE_OF_CMD_BUFFER, GFP_KERNEL); 631 buf = kzalloc(MWIFIEX_SIZE_OF_CMD_BUFFER, GFP_KERNEL);
634 if (!buf) { 632 if (!buf)
635 dev_err(priv->adapter->dev, "%s: failed to alloc cmd buffer\n",
636 __func__);
637 return -ENOMEM; 633 return -ENOMEM;
638 }
639 634
640 txp_cfg = (struct host_cmd_ds_txpwr_cfg *) buf; 635 txp_cfg = (struct host_cmd_ds_txpwr_cfg *) buf;
641 txp_cfg->action = cpu_to_le16(HostCmd_ACT_GEN_SET); 636 txp_cfg->action = cpu_to_le16(HostCmd_ACT_GEN_SET);
diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c
index 135d96df2063..32adc878041d 100644
--- a/drivers/net/wireless/mwifiex/wmm.c
+++ b/drivers/net/wireless/mwifiex/wmm.c
@@ -109,12 +109,9 @@ mwifiex_wmm_allocate_ralist_node(struct mwifiex_adapter *adapter, u8 *ra)
109 struct mwifiex_ra_list_tbl *ra_list; 109 struct mwifiex_ra_list_tbl *ra_list;
110 110
111 ra_list = kzalloc(sizeof(struct mwifiex_ra_list_tbl), GFP_ATOMIC); 111 ra_list = kzalloc(sizeof(struct mwifiex_ra_list_tbl), GFP_ATOMIC);
112 112 if (!ra_list)
113 if (!ra_list) {
114 dev_err(adapter->dev, "%s: failed to alloc ra_list\n",
115 __func__);
116 return NULL; 113 return NULL;
117 } 114
118 INIT_LIST_HEAD(&ra_list->list); 115 INIT_LIST_HEAD(&ra_list->list);
119 skb_queue_head_init(&ra_list->skb_head); 116 skb_queue_head_init(&ra_list->skb_head);
120 117
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c
index 88e3ad2d1db8..38ec8d19ac29 100644
--- a/drivers/net/wireless/orinoco/main.c
+++ b/drivers/net/wireless/orinoco/main.c
@@ -853,12 +853,8 @@ void __orinoco_ev_rx(struct net_device *dev, struct hermes *hw)
853 int err; 853 int err;
854 854
855 desc = kmalloc(sizeof(*desc), GFP_ATOMIC); 855 desc = kmalloc(sizeof(*desc), GFP_ATOMIC);
856 if (!desc) { 856 if (!desc)
857 printk(KERN_WARNING
858 "%s: Can't allocate space for RX descriptor\n",
859 dev->name);
860 goto update_stats; 857 goto update_stats;
861 }
862 858
863 rxfid = hermes_read_regn(hw, RXFID); 859 rxfid = hermes_read_regn(hw, RXFID);
864 860
@@ -1336,10 +1332,9 @@ static void qbuf_scan(struct orinoco_private *priv, void *buf,
1336 unsigned long flags; 1332 unsigned long flags;
1337 1333
1338 sd = kmalloc(sizeof(*sd), GFP_ATOMIC); 1334 sd = kmalloc(sizeof(*sd), GFP_ATOMIC);
1339 if (!sd) { 1335 if (!sd)
1340 printk(KERN_ERR "%s: failed to alloc memory\n", __func__);
1341 return; 1336 return;
1342 } 1337
1343 sd->buf = buf; 1338 sd->buf = buf;
1344 sd->len = len; 1339 sd->len = len;
1345 sd->type = type; 1340 sd->type = type;
@@ -1357,10 +1352,9 @@ static void qabort_scan(struct orinoco_private *priv)
1357 unsigned long flags; 1352 unsigned long flags;
1358 1353
1359 sd = kmalloc(sizeof(*sd), GFP_ATOMIC); 1354 sd = kmalloc(sizeof(*sd), GFP_ATOMIC);
1360 if (!sd) { 1355 if (!sd)
1361 printk(KERN_ERR "%s: failed to alloc memory\n", __func__);
1362 return; 1356 return;
1363 } 1357
1364 sd->len = -1; /* Abort */ 1358 sd->len = -1; /* Abort */
1365 1359
1366 spin_lock_irqsave(&priv->scan_lock, flags); 1360 spin_lock_irqsave(&priv->scan_lock, flags);
@@ -2290,7 +2284,6 @@ int orinoco_if_add(struct orinoco_private *priv,
2290 netif_carrier_off(dev); 2284 netif_carrier_off(dev);
2291 2285
2292 memcpy(dev->dev_addr, wiphy->perm_addr, ETH_ALEN); 2286 memcpy(dev->dev_addr, wiphy->perm_addr, ETH_ALEN);
2293 memcpy(dev->perm_addr, wiphy->perm_addr, ETH_ALEN);
2294 2287
2295 dev->base_addr = base_addr; 2288 dev->base_addr = base_addr;
2296 dev->irq = irq; 2289 dev->irq = irq;
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index 1f7858588919..b9deef66cf4b 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -510,11 +510,8 @@ static int p54u_upload_firmware_3887(struct ieee80211_hw *dev)
510 return err; 510 return err;
511 511
512 tmp = buf = kmalloc(P54U_FW_BLOCK, GFP_KERNEL); 512 tmp = buf = kmalloc(P54U_FW_BLOCK, GFP_KERNEL);
513 if (!buf) { 513 if (!buf)
514 dev_err(&priv->udev->dev, "(p54usb) cannot allocate firmware"
515 "upload buffer!\n");
516 return -ENOMEM; 514 return -ENOMEM;
517 }
518 515
519 left = block_size = min((size_t)P54U_FW_BLOCK, priv->fw->size); 516 left = block_size = min((size_t)P54U_FW_BLOCK, priv->fw->size);
520 strcpy(buf, p54u_firmware_upload_3887); 517 strcpy(buf, p54u_firmware_upload_3887);
@@ -637,11 +634,8 @@ static int p54u_upload_firmware_net2280(struct ieee80211_hw *dev)
637 const u8 *data; 634 const u8 *data;
638 635
639 buf = kmalloc(512, GFP_KERNEL); 636 buf = kmalloc(512, GFP_KERNEL);
640 if (!buf) { 637 if (!buf)
641 dev_err(&priv->udev->dev, "(p54usb) firmware buffer "
642 "alloc failed!\n");
643 return -ENOMEM; 638 return -ENOMEM;
644 }
645 639
646#define P54U_WRITE(type, addr, data) \ 640#define P54U_WRITE(type, addr, data) \
647 do {\ 641 do {\
diff --git a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c
index c5404cb59e08..9f19cceab487 100644
--- a/drivers/net/wireless/prism54/islpci_mgt.c
+++ b/drivers/net/wireless/prism54/islpci_mgt.c
@@ -123,11 +123,8 @@ islpci_mgmt_rx_fill(struct net_device *ndev)
123 123
124 if (buf->mem == NULL) { 124 if (buf->mem == NULL) {
125 buf->mem = kmalloc(MGMT_FRAME_SIZE, GFP_ATOMIC); 125 buf->mem = kmalloc(MGMT_FRAME_SIZE, GFP_ATOMIC);
126 if (!buf->mem) { 126 if (!buf->mem)
127 printk(KERN_WARNING
128 "Error allocating management frame.\n");
129 return -ENOMEM; 127 return -ENOMEM;
130 }
131 buf->size = MGMT_FRAME_SIZE; 128 buf->size = MGMT_FRAME_SIZE;
132 } 129 }
133 if (buf->pci_addr == 0) { 130 if (buf->pci_addr == 0) {
@@ -356,14 +353,11 @@ islpci_mgt_receive(struct net_device *ndev)
356 353
357 /* Determine frame size, skipping OID_INL_TUNNEL headers. */ 354 /* Determine frame size, skipping OID_INL_TUNNEL headers. */
358 size = PIMFOR_HEADER_SIZE + header->length; 355 size = PIMFOR_HEADER_SIZE + header->length;
359 frame = kmalloc(sizeof (struct islpci_mgmtframe) + size, 356 frame = kmalloc(sizeof(struct islpci_mgmtframe) + size,
360 GFP_ATOMIC); 357 GFP_ATOMIC);
361 if (!frame) { 358 if (!frame)
362 printk(KERN_WARNING
363 "%s: Out of memory, cannot handle oid 0x%08x\n",
364 ndev->name, header->oid);
365 continue; 359 continue;
366 } 360
367 frame->ndev = ndev; 361 frame->ndev = ndev;
368 memcpy(&frame->buf, header, size); 362 memcpy(&frame->buf, header, size);
369 frame->header = (pimfor_header_t *) frame->buf; 363 frame->header = (pimfor_header_t *) frame->buf;
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index fe2f272689aa..525fd7521dff 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -1621,11 +1621,8 @@ static void set_multicast_list(struct usbnet *usbdev)
1621 } else if (mc_count) { 1621 } else if (mc_count) {
1622 int i = 0; 1622 int i = 0;
1623 1623
1624 mc_addrs = kmalloc(mc_count * ETH_ALEN, GFP_ATOMIC); 1624 mc_addrs = kmalloc_array(mc_count, ETH_ALEN, GFP_ATOMIC);
1625 if (!mc_addrs) { 1625 if (!mc_addrs) {
1626 netdev_warn(usbdev->net,
1627 "couldn't alloc %d bytes of memory\n",
1628 mc_count * ETH_ALEN);
1629 netif_addr_unlock_bh(usbdev->net); 1626 netif_addr_unlock_bh(usbdev->net);
1630 return; 1627 return;
1631 } 1628 }
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
index 18b0bc51766b..bb7cc90bafb2 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
@@ -341,7 +341,7 @@ static struct rtl_hal_cfg rtl8723ae_hal_cfg = {
341 .maps[RTL_RC_HT_RATEMCS15] = DESC92_RATEMCS15, 341 .maps[RTL_RC_HT_RATEMCS15] = DESC92_RATEMCS15,
342}; 342};
343 343
344static struct pci_device_id rtl8723ae_pci_ids[] __devinitdata = { 344static struct pci_device_id rtl8723ae_pci_ids[] = {
345 {RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8723, rtl8723ae_hal_cfg)}, 345 {RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8723, rtl8723ae_hal_cfg)},
346 {}, 346 {},
347}; 347};
diff --git a/drivers/net/wireless/ti/wlcore/wlcore_i.h b/drivers/net/wireless/ti/wlcore/wlcore_i.h
index c845b0ef7f4b..508f5b0f8a70 100644
--- a/drivers/net/wireless/ti/wlcore/wlcore_i.h
+++ b/drivers/net/wireless/ti/wlcore/wlcore_i.h
@@ -111,9 +111,9 @@ enum {
111 111
112struct wl1271_chip { 112struct wl1271_chip {
113 u32 id; 113 u32 id;
114 char fw_ver_str[ETHTOOL_BUSINFO_LEN]; 114 char fw_ver_str[ETHTOOL_FWVERS_LEN];
115 unsigned int fw_ver[NUM_FW_VER]; 115 unsigned int fw_ver[NUM_FW_VER];
116 char phy_fw_ver_str[ETHTOOL_BUSINFO_LEN]; 116 char phy_fw_ver_str[ETHTOOL_FWVERS_LEN];
117}; 117};
118 118
119#define NUM_TX_QUEUES 4 119#define NUM_TX_QUEUES 4
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index ef2b171e3514..7ef0b4a181e1 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -155,7 +155,6 @@ static int upload_code(struct usb_device *udev,
155 */ 155 */
156 p = kmalloc(MAX_TRANSFER_SIZE, GFP_KERNEL); 156 p = kmalloc(MAX_TRANSFER_SIZE, GFP_KERNEL);
157 if (!p) { 157 if (!p) {
158 dev_err(&udev->dev, "out of memory\n");
159 r = -ENOMEM; 158 r = -ENOMEM;
160 goto error; 159 goto error;
161 } 160 }