From: Ron Mercer Date: Fri, 13 Feb 2009 00:37:32 +0000 (-0800) Subject: qlge: bugfix: Add missing put_page() call. X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f2603c2c571978497019a50c4df84c185ffef356;p=linux-2.6-omap-h63xx.git qlge: bugfix: Add missing put_page() call. We put the page back if we can't get mapping for it. We don't want unmapped buffers on our receive buffer queue. Signed-off-by: Ron Mercer Signed-off-by: David S. Miller --- diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 69f7d057dd2..5b75fc9a26b 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -907,6 +907,8 @@ static void ql_update_lbq(struct ql_adapter *qdev, struct rx_ring *rx_ring) 0, PAGE_SIZE, PCI_DMA_FROMDEVICE); if (pci_dma_mapping_error(qdev->pdev, map)) { + put_page(lbq_desc->p.lbq_page); + lbq_desc->p.lbq_page = NULL; QPRINTK(qdev, RX_STATUS, ERR, "PCI mapping failed.\n"); return;