Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 888c88b8 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by David S. Miller
Browse files

net: gianfar: no need to check parameter being != NULL for of_node_put



of_node_put is a noop when being called with NULL.

Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e5a98fc2
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -1435,9 +1435,7 @@ static int gfar_probe(struct platform_device *ofdev)
	unmap_group_regs(priv);
	gfar_free_rx_queues(priv);
	gfar_free_tx_queues(priv);
	if (priv->phy_node)
	of_node_put(priv->phy_node);
	if (priv->tbi_node)
	of_node_put(priv->tbi_node);
	free_gfar_dev(priv);
	return err;
@@ -1447,9 +1445,7 @@ static int gfar_remove(struct platform_device *ofdev)
{
	struct gfar_private *priv = platform_get_drvdata(ofdev);

	if (priv->phy_node)
	of_node_put(priv->phy_node);
	if (priv->tbi_node)
	of_node_put(priv->tbi_node);

	unregister_netdev(priv->ndev);