Skip to content

Commit f28c47b

Browse files
Lotte-Baikuba-moo
authored andcommitted
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>
1 parent e21bebf commit f28c47b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/ethernet/engleder/tsnep_main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,8 +1091,7 @@ static int tsnep_mdio_init(struct tsnep_adapter *adapter)
10911091
retval = of_mdiobus_register(adapter->mdiobus, np);
10921092

10931093
out:
1094-
if (np)
1095-
of_node_put(np);
1094+
of_node_put(np);
10961095

10971096
return retval;
10981097
}

0 commit comments

Comments
 (0)