Skip to content

Commit

Permalink
tsnep: Remove useless null check before call of_node_put()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Haowen Bai authored and Jakub Kicinski committed Apr 22, 2022
1 parent e21bebf commit f28c47b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/engleder/tsnep_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f28c47b

Please sign in to comment.