diff options
-rw-r--r-- | tools/power/x86/intel-speed-select/isst-daemon.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-daemon.c b/tools/power/x86/intel-speed-select/isst-daemon.c index 0699137c0901..4ad6a64f1545 100644 --- a/tools/power/x86/intel-speed-select/isst-daemon.c +++ b/tools/power/x86/intel-speed-select/isst-daemon.c @@ -174,6 +174,8 @@ static void daemonize(char *rundir, char *pidfile) close(i); i = open("/dev/null", O_RDWR); + if (i < 0) + exit(EXIT_FAILURE); ret = dup(i); if (ret == -1) exit(EXIT_FAILURE); |