diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2012-12-27 11:37:30 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-02 14:38:33 -0500 |
commit | 708b70ff31e0577bff3c48eefa19122f6e346252 (patch) | |
tree | 744203201aa59659c46eb326fe48ee8b428f0f19 /drivers | |
parent | 9145910161ebe227fcdacbc771fadfa55a364763 (diff) |
rtlwifi: rtl8192de: 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/rtl8192de/trx.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c index f9f3861046c1..a0fbf284420e 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c | |||
@@ -587,6 +587,11 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw, | |||
587 | buf_len = skb->len; | 587 | buf_len = skb->len; |
588 | mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len, | 588 | mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len, |
589 | PCI_DMA_TODEVICE); | 589 | PCI_DMA_TODEVICE); |
590 | if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { | ||
591 | RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, | ||
592 | "DMA mapping error"); | ||
593 | return; | ||
594 | } | ||
590 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, sizeof(struct tx_desc_92d)); | 595 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, sizeof(struct tx_desc_92d)); |
591 | if (ieee80211_is_nullfunc(fc) || ieee80211_is_ctl(fc)) { | 596 | if (ieee80211_is_nullfunc(fc) || ieee80211_is_ctl(fc)) { |
592 | firstseg = true; | 597 | firstseg = true; |
@@ -740,6 +745,11 @@ void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, | |||
740 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); | 745 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); |
741 | __le16 fc = hdr->frame_control; | 746 | __le16 fc = hdr->frame_control; |
742 | 747 | ||
748 | if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { | ||
749 | RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, | ||
750 | "DMA mapping error"); | ||
751 | return; | ||
752 | } | ||
743 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE); | 753 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE); |
744 | if (firstseg) | 754 | if (firstseg) |
745 | SET_TX_DESC_OFFSET(pdesc, USB_HWDESC_HEADER_LEN); | 755 | SET_TX_DESC_OFFSET(pdesc, USB_HWDESC_HEADER_LEN); |