From e7a860769536663f9ff26fc8eee8cfd5897dfd91 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 2 Dec 2015 09:56:17 +0100 Subject: device: don't return error from release_slave() release_slave() should do the right thing and handle errors as good as it can. There is no value in propagating the error and it's not clear what the caller should do in face of a failure during release. --- src/devices/nm-device-bond.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/devices/nm-device-bond.c') diff --git a/src/devices/nm-device-bond.c b/src/devices/nm-device-bond.c index 033c57214f..cd1e1053f5 100644 --- a/src/devices/nm-device-bond.c +++ b/src/devices/nm-device-bond.c @@ -419,13 +419,13 @@ enslave_slave (NMDevice *device, return TRUE; } -static gboolean +static void release_slave (NMDevice *device, NMDevice *slave, gboolean configure) { NMDeviceBond *self = NM_DEVICE_BOND (device); - gboolean success = TRUE, no_firmware = FALSE; + gboolean success, no_firmware = FALSE; if (configure) { success = nm_platform_link_release (NM_PLATFORM_GET, @@ -444,8 +444,7 @@ release_slave (NMDevice *device, nm_device_get_ip_iface (slave)); } - if (success) - g_object_notify (G_OBJECT (device), NM_DEVICE_BOND_SLAVES); + g_object_notify (G_OBJECT (device), NM_DEVICE_BOND_SLAVES); if (configure) { /* Kernel bonding code "closes" the slave when releasing it, (which clears @@ -455,8 +454,6 @@ release_slave (NMDevice *device, if (!nm_device_bring_up (slave, TRUE, &no_firmware)) _LOGW (LOGD_BOND, "released bond slave could not be brought up."); } - - return success; } static gboolean -- cgit v1.2.1