tsnep: Remove useless null check before call of_node_put()

No need to add null check before call of_node_put(), since the
implementation of of_node_put() has done it.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Link: https://lore.kernel.org/r/1650509283-26168-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Haowen Bai 2022-04-21 10:48:03 +08:00 committed by Jakub Kicinski
parent e21bebf972
commit f28c47bb9f

View file

@ -1091,8 +1091,7 @@ static int tsnep_mdio_init(struct tsnep_adapter *adapter)
retval = of_mdiobus_register(adapter->mdiobus, np);
out:
if (np)
of_node_put(np);
of_node_put(np);
return retval;
}