net: fman: Clean up error handling
authorSean Anderson <sean.anderson@seco.com>
Fri, 2 Sep 2022 21:57:31 +0000 (17:57 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Sep 2022 13:27:39 +0000 (14:27 +0100)
commitaedbeb4e597e9f6202d36e249f1027138a764a67
tree33f717bc68bb0822d5500493d0a1dfbbc13fc82c
parent5b6acb554065e9e0a8e93f17573afeae1e121844
net: fman: Clean up error handling

This removes the _return label, since something like

err = -EFOO;
goto _return;

can be replaced by the briefer

return -EFOO;

Additionally, this skips going to _return_of_node_put when dev_node has
already been put (preventing a double put).

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Acked-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fman/mac.c