netifd: Do not return values in void function
[project/netifd.git] / interface-event.c
index a40f6dc883d3a3654d73d0592cd7eb65c2a8de85..b03bfbcac7f055b5cc8e9a3d5898fed7522ae51f 100644 (file)
@@ -49,8 +49,10 @@ run_cmd(const char *ifname, const char *device, enum interface_event event,
        int pid;
 
        pid = fork();
-       if (pid < 0)
-               return task_complete(NULL, -1);
+       if (pid < 0) {
+               task_complete(NULL, -1);
+               return;
+       }
 
        if (pid > 0) {
                task.pid = pid;