Remove a check for NULL that would have been after a NULL dereference
authorjsg <jsg@openbsd.org>
Wed, 29 Apr 2015 04:43:25 +0000 (04:43 +0000)
committerjsg <jsg@openbsd.org>
Wed, 29 Apr 2015 04:43:25 +0000 (04:43 +0000)
if callers of save_vec() weren't expected to pass a non NULL pointer
as an argument.

ok kettenis@

sys/arch/powerpc/powerpc/trap.c

index 5586f35..2919f0b 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: trap.c,v 1.103 2014/11/16 12:30:58 deraadt Exp $      */
+/*     $OpenBSD: trap.c,v 1.104 2015/04/29 04:43:25 jsg Exp $  */
 /*     $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $        */
 
 /*
@@ -91,9 +91,6 @@ save_vec(struct proc *p)
        struct vreg *pcb_vr = pcb->pcb_vr;
        u_int32_t oldmsr, msr;
 
-       if (p == NULL)
-               return;
-
        /* first we enable vector so that we dont throw an exception
         * in kernel mode
         */