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

View 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;