Message ID | 1417281677-7133-1-git-send-email-tinajohnson.1234@gmail.com (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
diff --git a/drivers/infiniband/hw/amso1100/c2.c b/drivers/infiniband/hw/amso1100/c2.c index 766a71c..c623e82 100644 --- a/drivers/infiniband/hw/amso1100/c2.c +++ b/drivers/infiniband/hw/amso1100/c2.c @@ -231,6 +231,10 @@ static inline int c2_rx_alloc(struct c2_port *c2_port, struct c2_element *elem) mapaddr = pci_map_single(c2dev->pcidev, skb->data, maplen, PCI_DMA_FROMDEVICE); + if (pci_dma_mapping_error(c2dev->pcidev, mapaddr)) { + dev_kfree_skb(skb); + return -ENOMEM; + } /* Set the sk_buff RXP_header to RXP_HRXD_READY */ rxp_hdr = (struct c2_rxp_hdr *) skb->data;