From: Zhang Rui Date: Thu, 12 Jan 2023 06:43:36 +0000 (+0800) Subject: tools/power/x86/intel-speed-select: Remove duplicate dup() X-Git-Tag: io_uring-6.3-2023-03-03~15^2~56 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=8a44d27542cd84352c69e37deaafb8b8976f21a0;p=linux-block.git tools/power/x86/intel-speed-select: Remove duplicate dup() Remove the duplicate dup() invocation. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede --- diff --git a/tools/power/x86/intel-speed-select/isst-daemon.c b/tools/power/x86/intel-speed-select/isst-daemon.c index 4ad6a64f1545..c2290ef0e3af 100644 --- a/tools/power/x86/intel-speed-select/isst-daemon.c +++ b/tools/power/x86/intel-speed-select/isst-daemon.c @@ -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)