summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2016-10-10 17:45:27 +0000
committerLubomir Rintel <lkundrak@v3.sk>2016-10-11 10:36:15 +0200
commitafe123c3a187f9e13ea90bcd08af822e7e3d5f2a (patch)
tree7d33a412b65535a81d20bc82cbf8cea39f4f1a5b /src
parent15a26d6192ed24cb97f443a06a1514e82e58b43f (diff)
downloadNetworkManager-afe123c3a187f9e13ea90bcd08af822e7e3d5f2a.tar.gz
ethernet: don't assert there's the udev device for an ethernet device
We could be running in a container.
Diffstat (limited to 'src')
-rw-r--r--src/devices/nm-device-ethernet.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c
index 3604a168a8..e7d43763b5 100644
--- a/src/devices/nm-device-ethernet.c
+++ b/src/devices/nm-device-ethernet.c
@@ -171,11 +171,8 @@ _update_s390_subchannels (NMDeviceEthernet *self)
ifindex = nm_device_get_ifindex ((NMDevice *) self);
dev = (GUdevDevice *) nm_g_object_ref (nm_platform_link_get_udev_device (NM_PLATFORM_GET, ifindex));
- if (!dev) {
- /* we only call _update_s390_subchannels() when platform claims the device to be initialized.
- * Thus, we expect to successfully lookup a GUdevDevice. */
- g_return_if_reached ();
- }
+ if (!dev)
+ return;
/* Try for the "ccwgroup" parent */
parent = g_udev_device_get_parent_with_subsystem (dev, "ccwgroup", NULL);