]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-device: fix return value on error path
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 25 Nov 2018 05:06:27 +0000 (14:06 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 25 Nov 2018 05:06:27 +0000 (14:06 +0900)
src/libsystemd/sd-device/device-monitor.c

index 05e7ec07159bf83563710eafd77ba23384c5e23d..dd312e91cebdeda80ca7d97f7d5481a50663705b 100644 (file)
@@ -246,7 +246,7 @@ _public_ int sd_device_monitor_attach_event(sd_device_monitor *m, sd_event *even
         else {
                 r = sd_event_default(&m->event);
                 if (r < 0)
-                        return 0;
+                        return r;
         }
 
         return 0;