mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
vxge: use pci_dma_mapping_error to test return value
pci_dma_mapping_error should be used to test return value of pci_map_single or pci_map_page. Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
31b683b644
commit
fa15e99b6b
@ -310,7 +310,7 @@ static int vxge_rx_map(void *dtrh, struct vxge_ring *ring)
|
||||
dma_addr = pci_map_single(ring->pdev, rx_priv->skb_data,
|
||||
rx_priv->data_size, PCI_DMA_FROMDEVICE);
|
||||
|
||||
if (dma_addr == 0) {
|
||||
if (unlikely(pci_dma_mapping_error(ring->pdev, dma_addr))) {
|
||||
ring->stats.pci_map_fail++;
|
||||
return -EIO;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user