-/* $OpenBSD: trap.c,v 1.79 2015/06/05 16:59:10 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.80 2015/06/23 12:29:46 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */
/*-
* argument space is lazy-allocated.
*/
if (!user && (a0 >= VM_MIN_KERNEL_ADDRESS ||
- p == NULL || p->p_addr->u_pcb.pcb_onfault == 0)) {
+ p->p_addr->u_pcb.pcb_onfault == 0)) {
vm = NULL;
map = kernel_map;
} else {
if (map != kernel_map &&
(caddr_t)va >= vm->vm_maxsaddr) {
if (rv == 0) {
- if (p != NULL)
- uvm_grow(p, va);
+ uvm_grow(p, va);
} else if (rv == EACCES)
rv = EFAULT;
}