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

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1835,7 +1835,6 @@ static int lan78xx_mdio_init(struct lan78xx_net *dev)

	node = of_get_child_by_name(dev->udev->dev.of_node, "mdio");
	ret = of_mdiobus_register(dev->mdiobus, node);
	if (node)
	of_node_put(node);
	if (ret) {
		netdev_err(dev->net, "can't register MDIO bus\n");