From 62443342646df1c4984475f4bf1e09ae1e2a97c6 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 26 Feb 2013 16:11:49 +0100 Subject: [PATCH] powerpc: harden the clock ATB probe a bit Signed-off-by: Jens Axboe --- arch/arch-ppc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arch-ppc.h b/arch/arch-ppc.h index 75176275..0cc0cbda 100644 --- a/arch/arch-ppc.h +++ b/arch/arch-ppc.h @@ -96,11 +96,11 @@ static void atb_clocktest(void) pid = fork(); if (!pid) atb_child(); - else { + else if (pid != -1) { int status; - wait(&status); - if (!WIFEXITED(status)) + pid = wait(&status); + if (pid == -1 || !WIFEXITED(status)) arch_flags &= ~ARCH_FLAG_1; else arch_flags |= ARCH_FLAG_1; -- 2.25.1