bnx2x: fix pf2vf bulletin DMA mapping leak
authorMichal Schmidt <mschmidt@redhat.com>
Tue, 6 Jun 2017 14:30:31 +0000 (16:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Jun 2017 16:59:42 +0000 (12:59 -0400)
When freeing VF's DMA mappings, an already NULLed pointer was checked
again due to an apparent copy&paste error. Consequently, the pf2vf
bulletin DMA mapping was not freed.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c

index bdfd53b46bc568286ac9debc70bb14563329040b..870ea001a72022e340eb9ca093211b57065bb0d4 100644 (file)
@@ -3042,7 +3042,7 @@ void bnx2x_vf_pci_dealloc(struct bnx2x *bp)
 {
        BNX2X_PCI_FREE(bp->vf2pf_mbox, bp->vf2pf_mbox_mapping,
                       sizeof(struct bnx2x_vf_mbx_msg));
-       BNX2X_PCI_FREE(bp->vf2pf_mbox, bp->pf2vf_bulletin_mapping,
+       BNX2X_PCI_FREE(bp->pf2vf_bulletin, bp->pf2vf_bulletin_mapping,
                       sizeof(union pf_vf_bulletin));
 }