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: 3933961682 ('fsl/fman: Add FMan MAC driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Dan Carpenter 2016-01-06 12:59:10 +03:00 committed by David S. Miller
parent e06a03bdf8
commit 9e02d8caaf
1 changed files with 0 additions and 1 deletions

View File

@ -961,7 +961,6 @@ static int mac_probe(struct platform_device *_of_dev)
of_node_put(dev_node); of_node_put(dev_node);
_return_dev_set_drvdata: _return_dev_set_drvdata:
kfree(priv->fixed_link); kfree(priv->fixed_link);
kfree(priv);
dev_set_drvdata(dev, NULL); dev_set_drvdata(dev, NULL);
_return: _return:
return err; return err;