From 3b69a05fa0a190d6df58ff99e15c5d7edff0ec7d Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 20 Jan 2017 16:47:21 +0100 Subject: [PATCH] device: remove duplicate setting of device's driver property Fixes: 4dbaac4ba24ebc8b257fffe5197cc8e362804a58 (cherry picked from commit 59f37f31d9747a7071d720367e0fe69007fc7570) --- src/devices/nm-device.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index bc44487d7..6e0133aa0 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -2140,8 +2140,7 @@ device_link_changed (NMDevice *self) _notify (self, PROP_UDI); } - if (g_strcmp0 (info.driver, priv->driver)) { - /* Update driver to what udev gives us */ + if (!nm_streq0 (info.driver, priv->driver)) { g_free (priv->driver); priv->driver = g_strdup (info.driver); _notify (self, PROP_DRIVER); @@ -2152,12 +2151,6 @@ device_link_changed (NMDevice *self) _notify (self, PROP_MTU); } - if (info.driver && g_strcmp0 (priv->driver, info.driver) != 0) { - g_free (priv->driver); - priv->driver = g_strdup (info.driver); - _notify (self, PROP_DRIVER); - } - if (ifindex == nm_device_get_ip_ifindex (self)) _stats_update_counters_from_pllink (self, &info);