if (!bp->rx_ring) goto out_err; 
if (!bp->rx_ring) { /* Allocation may have failed due to pci_alloc_consistent insisting on use of GFP_DMA, which is more restrictive than necessary...  */ struct dma_desc *rx_ring; dma_addr_t rx_ring_dma;  if (!(rx_ring = (struct dma_desc *)kmalloc(size, GFP_KERNEL))) goto out_err;  memset(rx_ring, 0, size); rx_ring_dma = dma_map_single(&bp->pdev->dev, rx_ring, DMA_TABLE_BYTES, DMA_BIDIRECTIONAL);  if (rx_ring_dma + size > B44_DMA_MASK) { kfree(rx_ring); goto out_err; }  bp->rx_ring = rx_ring; bp->rx_ring_dma = rx_ring_dma; bp->flags |= B44_FLAG_RX_RING_HACK; } 
static int b44_alloc_consistent(struct b44 *bp){	int size;	size  = B44_RX_RING_SIZE * sizeof(struct ring_info);	bp->rx_buffers = kmalloc(size, GFP_KERNEL);	if (!bp->rx_buffers)		goto out_err;	memset(bp->rx_buffers, 0, size);	size = B44_TX_RING_SIZE * sizeof(struct ring_info);	bp->tx_buffers = kmalloc(size, GFP_KERNEL);	if (!bp->tx_buffers)		goto out_err;	memset(bp->tx_buffers, 0, size);	size = DMA_TABLE_BYTES;	bp->rx_ring = pci_alloc_consistent(bp->pdev, size, &bp->rx_ring_dma);	if (!bp->rx_ring)		goto out_err;	bp->tx_ring = pci_alloc_consistent(bp->pdev, size, &bp->tx_ring_dma);	if (!bp->tx_ring)		goto out_err;	return 0;out_err:	b44_free_consistent(bp);	return -ENOMEM;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/9f38c636ababfb41e58c9ec1e9719492ef7f0479/b44.c/buggy/drivers/net/b44.c