fsl/fman: double free on probe failure
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 6 Jan 2016 09:59:10 +0000 (12:59 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jan 2016 20:28:11 +0000 (15:28 -0500)
"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>
drivers/net/ethernet/freescale/fman/mac.c

index 743a393ba657f41d7ff29d9f7f228ade65ab66ad..e33d9d24c1db4455dd6d20c3dc8cf3f63ee6a069 100644 (file)
@@ -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;