device: remove unused if branch in device_link_changed()

nm_device_set_unmanaged_by_user_settings() does nothing when the
device is unmanaged by platform-init. Remove the if branch to make
this more explicit.
This commit is contained in:
Beniamino Galvani 2022-02-02 09:35:36 +01:00
parent dc1092e22b
commit b2e1bd4436

View file

@ -6459,10 +6459,11 @@ device_link_changed(gpointer user_data)
/* If the device has no explicit ip_iface, then changing iface changes ip_iface too. */
ip_ifname_changed = !priv->ip_iface;
if (nm_device_get_unmanaged_flags(self, NM_UNMANAGED_PLATFORM_INIT))
nm_device_set_unmanaged_by_user_settings(self);
else
if (!nm_device_get_unmanaged_flags(self, NM_UNMANAGED_PLATFORM_INIT)) {
/* Since the interface name changed, we need to re-evaluate the
* user settings specs. */
update_unmanaged_specs = TRUE;
}
_notify(self, PROP_IFACE);
if (ip_ifname_changed)