8139cp: fix coherent mapping leak in error path.
authorfrançois romieu <romieu@fr.zoreil.com>
Sat, 1 Dec 2012 13:08:50 +0000 (13:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 2 Dec 2012 01:39:17 +0000 (20:39 -0500)
cp_open
[...]
        rc = cp_alloc_rings(cp);
        if (rc)
                return rc;

cp_alloc_rings
[...]
        mem = dma_alloc_coherent(&cp->pdev->dev, CP_RING_BYTES,
                                 &cp->ring_dma, GFP_KERNEL);

- cp_alloc_rings never frees the coherent mapping it allocates
- neither do cp_open when cp_alloc_rings fails

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found