Commit 764ea371 authored by zhong jiang's avatar zhong jiang Committed by David S. Miller

net: usb: 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>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1635bb54
...@@ -1835,8 +1835,7 @@ static int lan78xx_mdio_init(struct lan78xx_net *dev) ...@@ -1835,8 +1835,7 @@ static int lan78xx_mdio_init(struct lan78xx_net *dev)
node = of_get_child_by_name(dev->udev->dev.of_node, "mdio"); node = of_get_child_by_name(dev->udev->dev.of_node, "mdio");
ret = of_mdiobus_register(dev->mdiobus, node); ret = of_mdiobus_register(dev->mdiobus, node);
if (node) of_node_put(node);
of_node_put(node);
if (ret) { if (ret) {
netdev_err(dev->net, "can't register MDIO bus\n"); netdev_err(dev->net, "can't register MDIO bus\n");
goto exit1; goto exit1;
......
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