Commit 9e02d8ca authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

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: 39339616 ('fsl/fman: Add FMan MAC driver')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e06a03bd
......@@ -961,7 +961,6 @@ static int mac_probe(struct platform_device *_of_dev)
of_node_put(dev_node);
_return_dev_set_drvdata:
kfree(priv->fixed_link);
kfree(priv);
dev_set_drvdata(dev, NULL);
_return:
return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment