diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-01-06 12:59:10 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-06 15:28:11 -0500 |
commit | 9e02d8caaf90077bc47e054e4c3a41736245a9f8 (patch) | |
tree | f14660beb0b501c734717dd8bdff3c56fcf43bfa /drivers/net/ethernet/freescale/fman/mac.c | |
parent | e06a03bdf8781d6a93a13d5bdf33d058ca498a86 (diff) | |
download | linux-9e02d8caaf90077bc47e054e4c3a41736245a9f8.tar.gz linux-9e02d8caaf90077bc47e054e4c3a41736245a9f8.tar.bz2 linux-9e02d8caaf90077bc47e054e4c3a41736245a9f8.zip |
fsl/fman: double free on probe failure
"priv" is allocated with devm_kzalloc() so freeing it here with kfree()
will lead to a double free.
Fixes: 3933961682a3 ('fsl/fman: Add FMan MAC driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/fman/mac.c')
-rw-r--r-- | drivers/net/ethernet/freescale/fman/mac.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c index 743a393ba657..e33d9d24c1db 100644 --- a/drivers/net/ethernet/freescale/fman/mac.c +++ b/drivers/net/ethernet/freescale/fman/mac.c @@ -961,7 +961,6 @@ _return_of_node_put: of_node_put(dev_node); _return_dev_set_drvdata: kfree(priv->fixed_link); - kfree(priv); dev_set_drvdata(dev, NULL); _return: return err; |