Changeset 33071


Ignore:
Timestamp:
2012-08-09T11:06:35+02:00 (5 years ago)
Author:
florian
Message:

[mcs814x] nuport-mac: use dma_mapping_error() instead of checking pointers

Thanks Gabor for spotting this

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c

    r33070 r33071  
    257257        priv->tx_addr = dma_map_single(&priv->pdev->dev, skb->data, 
    258258                        skb->len, DMA_TO_DEVICE); 
    259         if (!priv->tx_addr) 
     259        if (dma_mapping_error(&priv->pdev->dev, priv->tx_addr)) 
    260260                return -ENOMEM; 
    261261 
     
    300300        priv->rx_addr = dma_map_single(&priv->pdev->dev, skb->data, 
    301301                                RX_ALLOC_SIZE, DMA_FROM_DEVICE); 
    302         if (!priv->rx_addr) 
     302        if (dma_mapping_error(&priv->pdev->dev, priv->rx_addr)) 
    303303                return -ENOMEM; 
    304304 
Note: See TracChangeset for help on using the changeset viewer.