tools/power/x86/intel-speed-select: Remove duplicate dup()
authorZhang Rui <rui.zhang@intel.com>
Thu, 12 Jan 2023 06:43:36 +0000 (14:43 +0800)
committerHans de Goede <hdegoede@redhat.com>
Fri, 3 Feb 2023 08:57:01 +0000 (09:57 +0100)
Remove the duplicate dup() invocation.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
tools/power/x86/intel-speed-select/isst-daemon.c

index 4ad6a64..c2290ef 100644 (file)
@@ -176,9 +176,6 @@ static void daemonize(char *rundir, char *pidfile)
        i = open("/dev/null", O_RDWR);
        if (i < 0)
                exit(EXIT_FAILURE);
-       ret = dup(i);
-       if (ret == -1)
-               exit(EXIT_FAILURE);
 
        ret = dup(i);
        if (ret == -1)