]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/device: remove unnecessary check (#8661)
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 6 Apr 2018 06:45:13 +0000 (15:45 +0900)
committerGitHub <noreply@github.com>
Fri, 6 Apr 2018 06:45:13 +0000 (15:45 +0900)
Follow-up for 0dfb0a0abd98f8726a39f26e4d737f47ec0fd53b.

src/core/device.c

index 8ba55625cd35354b8df89696c924cd091d40af36..b8ae730ac6fc450cb9607f19ef5aad39f3eec3b1 100644 (file)
@@ -658,10 +658,7 @@ static void device_shutdown(Manager *m) {
         assert(m);
 
         m->udev_event_source = sd_event_source_unref(m->udev_event_source);
-
-        if (m->udev_monitor)
-                m->udev_monitor = udev_monitor_unref(m->udev_monitor);
-
+        m->udev_monitor = udev_monitor_unref(m->udev_monitor);
         m->devices_by_sysfs = hashmap_free(m->devices_by_sysfs);
 }