From: Dan Carpenter Date: Wed, 6 Jan 2016 09:59:10 +0000 (+0300) Subject: fsl/fman: double free on probe failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9e02d8caaf90077bc47e054e4c3a41736245a9f8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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;