diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2012-12-27 10:37:29 -0600 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-02 14:38:32 -0500 |
commit | 9145910161ebe227fcdacbc771fadfa55a364763 (patch) | |
tree | 42d87477c70056d1c33851b12bfd366230e254d0 /drivers | |
parent | 86bfec8d5183be4601db3cc4ffab58fceec33838 (diff) | |
download | linux-stable-9145910161ebe227fcdacbc771fadfa55a364763.tar.gz linux-stable-9145910161ebe227fcdacbc771fadfa55a364763.tar.bz2 linux-stable-9145910161ebe227fcdacbc771fadfa55a364763.zip |
rtlwifi: rtl8192ce: Fix warning for unchecked pci_map_single() call
Kernel 3.8 implements checking of all DMA mapping calls and issues
a WARNING for the first it finds that is not checked.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c index 173424756149..c31795e379f7 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c @@ -611,8 +611,14 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, dma_addr_t mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len, PCI_DMA_TODEVICE); + u8 bw_40 = 0; + if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { + RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, + "DMA mapping error"); + return; + } rcu_read_lock(); sta = get_sta(hw, mac->vif, mac->bssid); if (mac->opmode == NL80211_IFTYPE_STATION) { @@ -774,6 +780,11 @@ void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); __le16 fc = hdr->frame_control; + if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { + RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, + "DMA mapping error"); + return; + } CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE); if (firstseg) |