summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDenis Kirjanov <kirjanov@gmail.com>2010-01-10 22:40:10 +0100
committerDavid S. Miller <davem@davemloft.net>2010-01-10 22:40:10 +0100
commitfa15e99b6bb44aa86b241a43ca8c509e91f80153 (patch)
treef6187574229573fca8801e7a1a140bf89bc581bf /drivers
parentMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/... (diff)
downloadlinux-fa15e99b6bb44aa86b241a43ca8c509e91f80153.tar.xz
linux-fa15e99b6bb44aa86b241a43ca8c509e91f80153.zip
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/vxge/vxge-main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 0fdfd58a35a1..b9685e82f7b6 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -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;
}