From 19ce2d86dddd5f2190515aac73c8c08b6340af03 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Mon, 29 Mar 2021 13:43:51 -0700 Subject: [PATCH] netdev: remove unneeded goto/return code All possible paths led to the same result so it was simplified to remove two goto's and a return call. --- src/netdev.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/netdev.c b/src/netdev.c index fcbb7d88..914f6479 100644 --- a/src/netdev.c +++ b/src/netdev.c @@ -2234,12 +2234,7 @@ static void netdev_authenticate_event(struct l_genl_msg *msg, return; else if (ret > 0) status_code = (uint16_t)ret; - - goto auth_error; - } else - goto auth_error; - - return; + } auth_error: netdev_connect_failed(netdev, NETDEV_RESULT_AUTHENTICATION_FAILED,