mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-02 02:34:05 +08:00
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: zhong jiang <zhongjiang@huawei.com> Reviewed-by: Vladimir Zapolskiy <vz@mleia.com> Acked-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b458925ed5
commit
a4ebec033e
@ -2054,8 +2054,7 @@ 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);
|
||||
of_node_put(node);
|
||||
if (err)
|
||||
goto err_out_free_mdiobus;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user