mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
ethernet: marvell: mvpp2: add missing of_node_put after calling of_parse_phandle
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d4e4da00b6
commit
ccb80393c4
1 changed files with 2 additions and 0 deletions
|
@ -6234,6 +6234,7 @@ static int mvpp2_port_probe(struct platform_device *pdev,
|
|||
err_free_irq:
|
||||
irq_dispose_mapping(port->irq);
|
||||
err_free_netdev:
|
||||
of_node_put(phy_node);
|
||||
free_netdev(dev);
|
||||
return err;
|
||||
}
|
||||
|
@ -6244,6 +6245,7 @@ static void mvpp2_port_remove(struct mvpp2_port *port)
|
|||
int i;
|
||||
|
||||
unregister_netdev(port->dev);
|
||||
of_node_put(port->phy_node);
|
||||
free_percpu(port->pcpu);
|
||||
free_percpu(port->stats);
|
||||
for (i = 0; i < txq_number; i++)
|
||||
|
|
Loading…
Reference in a new issue