]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
qlge: bugfix: Add missing put_page() call.
authorRon Mercer <ron.mercer@qlogic.com>
Fri, 13 Feb 2009 00:37:32 +0000 (16:37 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Feb 2009 00:37:32 +0000 (16:37 -0800)
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 <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlge/qlge_main.c

index 69f7d057dd27dc700cfae7d1896135e1987071d5..5b75fc9a26ba2a93fb36668d054812debcc32c76 100644 (file)
@@ -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;