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

Commit 6c3a6503 authored by zhong jiang's avatar zhong jiang Committed by Gerrit - the friendly Code Review server
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.

Change-Id: I45e15c7a926e85e969f6da6d7581852ec6989df6
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Git-commit: 764ea3714a85bfc0e3e470cee2166b6ef911b9b9
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git


Signed-off-by: default avatarLiangliang Lu <luliang@codeaurora.org>
parent 96fb41fe
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1826,7 +1826,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");