Commit a4ebec03 authored by zhong jiang's avatar zhong jiang Committed by David S. Miller
Browse files

net: ethernet: remove redundant null pointer check before of_node_put



of_node_put has taken the null pointer check into account. So it is
safe to remove the duplicated check before of_node_put.

Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Reviewed-by: default avatarVladimir Zapolskiy <vz@mleia.com>
Acked-by: default avatarFugang Duan <fugang.duan@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b458925e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2054,7 +2054,6 @@ static int fec_enet_mii_init(struct platform_device *pdev)

	node = of_get_child_by_name(pdev->dev.of_node, "mdio");
	err = of_mdiobus_register(fep->mii_bus, node);
	if (node)
	of_node_put(node);
	if (err)
		goto err_out_free_mdiobus;