diff options
author | Madalin Bucur <madalin.bucur@freescale.com> | 2013-06-25 15:40:35 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-07-15 21:48:46 (GMT) |
commit | ba7039c00774b6eb8131ea517b570d89c6625e0e (patch) | |
tree | 9f292ec4f10793495aef559cfcf381cec603aed9 /drivers/net/ethernet/freescale/dpa/dpaa_eth_proxy.c | |
parent | a8266eb96e814689ff8259571fd09edb84cb750a (diff) | |
download | linux-fsl-qoriq-ba7039c00774b6eb8131ea517b570d89c6625e0e.tar.xz |
dpaa_eth: free buf_layout on error paths
The allocated buf_layout must be freed on all error paths.
Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
Change-Id: Icf2e68f90c28adcc99fdc56492942f3595033b21
Reviewed-on: http://git.am.freescale.net:8181/3093
Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com>
Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpa/dpaa_eth_proxy.c')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth_proxy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_proxy.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_proxy.c index 1f3e519..21dda6d 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_proxy.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_proxy.c @@ -132,8 +132,10 @@ static int dpaa_eth_proxy_probe(struct platform_device *_of_dev) if (!err) err = dpa_fq_probe_mac(dev, &proxy_fq_list, &port_fqs, true, TX); - if (err < 0) + if (err < 0) { + devm_kfree(dev, buf_layout); return err; + } /* Proxy initializer - Just configures the MAC on behalf of * another partition. |