Check for bad dma address in b44 1GB DMA workaround Signed-off-by: Andi Kleen --- drivers/net/b44.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: linux/drivers/net/b44.c =================================================================== --- linux.orig/drivers/net/b44.c +++ linux/drivers/net/b44.c @@ -650,7 +650,8 @@ static int b44_alloc_rx_skb(struct b44 * /* Hardware bug work-around, the chip is unable to do PCI DMA to/from anything above 1GB :-( */ - if (mapping + RX_PKT_BUF_SZ > B44_DMA_MASK) { + if (dma_mapping_error(mapping) || + mapping + RX_PKT_BUF_SZ > B44_DMA_MASK) { /* Sigh... */ pci_unmap_single(bp->pdev, mapping, RX_PKT_BUF_SZ,PCI_DMA_FROMDEVICE); dev_kfree_skb_any(skb);