diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-10-26 10:44:06 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-10-28 04:55:20 +0900 |
commit | 081466bd57cd441632e244292036f886ceac9112 (patch) | |
tree | f667a0bb8f58d7b26b1fa1e4b06cd1cbed5a51db /src/network/networkd-link.c | |
parent | 6fadf01cf3cdd98f78b7829f4c6c892306958394 (diff) | |
download | systemd-081466bd57cd441632e244292036f886ceac9112.tar.gz |
network: drop redundant condition
The function `link_reconfigure_impl()` has the same condition at the
beginning.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r-- | src/network/networkd-link.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 00e4e451ef..e901c62fbf 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -1537,15 +1537,12 @@ static int link_carrier_gained(Link *link) { force_reconfigure = link->previous_ssid && !streq_ptr(link->previous_ssid, link->ssid); link->previous_ssid = mfree(link->previous_ssid); - if (!IN_SET(link->state, LINK_STATE_PENDING, LINK_STATE_FAILED, LINK_STATE_LINGER)) { - /* At this stage, both wlan and link information should be up-to-date. Hence, - * it is not necessary to call RTM_GETLINK, NL80211_CMD_GET_INTERFACE, or - * NL80211_CMD_GET_STATION commands, and simply call link_reconfigure_impl(). - * Note, link_reconfigure_impl() returns 1 when the link is reconfigured. */ - r = link_reconfigure_impl(link, force_reconfigure); - if (r != 0) - return r; - } + /* At this stage, both wlan and link information should be up-to-date. Hence, it is not necessary to + * call RTM_GETLINK, NL80211_CMD_GET_INTERFACE, or NL80211_CMD_GET_STATION commands, and simply call + * link_reconfigure_impl(). Note, link_reconfigure_impl() returns 1 when the link is reconfigured. */ + r = link_reconfigure_impl(link, force_reconfigure); + if (r != 0) + return r; r = link_handle_bound_by_list(link); if (r < 0) |