|
@@ -1770,8 +1770,11 @@ static int e100_xmit_prepare(struct nic *nic, struct cb *cb,
|
|
dma_addr = pci_map_single(nic->pdev,
|
|
dma_addr = pci_map_single(nic->pdev,
|
|
skb->data, skb->len, PCI_DMA_TODEVICE);
|
|
skb->data, skb->len, PCI_DMA_TODEVICE);
|
|
/* If we can't map the skb, have the upper layer try later */
|
|
/* If we can't map the skb, have the upper layer try later */
|
|
- if (pci_dma_mapping_error(nic->pdev, dma_addr))
|
|
|
|
|
|
+ if (pci_dma_mapping_error(nic->pdev, dma_addr)) {
|
|
|
|
+ dev_kfree_skb_any(skb);
|
|
|
|
+ skb = NULL;
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
|
|
+ }
|
|
|
|
|
|
/*
|
|
/*
|
|
* Use the last 4 bytes of the SKB payload packet as the CRC, used for
|
|
* Use the last 4 bytes of the SKB payload packet as the CRC, used for
|