diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 42fc794a1a69..8a4a8faddb83 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -371,8 +371,7 @@ trap(frame) frame.tf_rip = (long)doreti_iret_fault; goto out; } - if (PCPU_GET(curpcb) != NULL && - PCPU_GET(curpcb)->pcb_onfault != NULL) { + if (PCPU_GET(curpcb)->pcb_onfault != NULL) { frame.tf_rip = (long)PCPU_GET(curpcb)->pcb_onfault; goto out; @@ -555,7 +554,6 @@ trap_pfault(frame, usermode) nogo: if (!usermode) { if (td->td_intr_nesting_level == 0 && - PCPU_GET(curpcb) != NULL && PCPU_GET(curpcb)->pcb_onfault != NULL) { frame->tf_rip = (long)PCPU_GET(curpcb)->pcb_onfault; return (0);