summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-06-05 16:45:25 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-06-05 16:45:25 +0000
commit12c07850b3844baf900ab62a3d99250851af5e2b (patch)
treea73c4f4df891b52f65e1a3bdb3748fe38466b67d /sys/arch/alpha
parentc509691220c51a8903ad1bf07f3fa4320e20051b (diff)
these days, curproc is never NULL, so skip those checks.
Discussed with kettenis
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r--sys/arch/alpha/alpha/trap.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/arch/alpha/alpha/trap.c b/sys/arch/alpha/alpha/trap.c
index 675a226cfe4..3efaeba90f4 100644
--- a/sys/arch/alpha/alpha/trap.c
+++ b/sys/arch/alpha/alpha/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.77 2014/12/24 21:15:30 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.78 2015/06/05 16:45:24 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */
/*-
@@ -418,13 +418,11 @@ do_fault:
}
va = trunc_page((vaddr_t)a0);
- if (p != NULL) {
- onfault = p->p_addr->u_pcb.pcb_onfault;
- p->p_addr->u_pcb.pcb_onfault = 0;
- }
+ onfault = p->p_addr->u_pcb.pcb_onfault;
+ p->p_addr->u_pcb.pcb_onfault = 0;
rv = uvm_fault(map, va, 0, ftype);
- if (p != NULL)
- p->p_addr->u_pcb.pcb_onfault = onfault;
+ p->p_addr->u_pcb.pcb_onfault = onfault;
+
/*
* If this was a stack access we keep track of the
* maximum accessed stack size. Also, if vm_fault
@@ -447,8 +445,7 @@ do_fault:
if (!user) {
/* Check for copyin/copyout fault */
- if (p != NULL &&
- p->p_addr->u_pcb.pcb_onfault != 0) {
+ if (p->p_addr->u_pcb.pcb_onfault != 0) {
framep->tf_regs[FRAME_PC] =
p->p_addr->u_pcb.pcb_onfault;
p->p_addr->u_pcb.pcb_onfault = 0;