summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/devices/nm-device.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 1395ccba60..d3ed95ac76 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -1002,9 +1002,6 @@ nm_device_release_one_slave (NMDevice *self, NMDevice *slave, gboolean configure
if (!configure) {
g_warn_if_fail (reason == NM_DEVICE_STATE_REASON_NONE || reason == NM_DEVICE_STATE_REASON_REMOVED);
reason = NM_DEVICE_STATE_REASON_NONE;
- } else if (reason == NM_DEVICE_STATE_REASON_NONE) {
- g_warn_if_reached ();
- reason = NM_DEVICE_STATE_REASON_UNKNOWN;
}
nm_device_slave_notify_release (info->slave, reason);
@@ -1703,8 +1700,7 @@ nm_device_slave_notify_release (NMDevice *self, NMDeviceStateReason reason)
NMDeviceState new_state;
const char *master_status;
- if ( reason != NM_DEVICE_STATE_REASON_NONE
- && priv->state > NM_DEVICE_STATE_DISCONNECTED
+ if ( priv->state > NM_DEVICE_STATE_DISCONNECTED
&& priv->state <= NM_DEVICE_STATE_ACTIVATED) {
if (reason == NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED) {
new_state = NM_DEVICE_STATE_FAILED;