diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-10-21 19:12:59 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-10-21 19:12:59 +0000 |
commit | a2de7f3318b02d0a355e4a16b1e66870a9179361 (patch) | |
tree | 7043dac3298f7557896d5766cc570a63243ed4d2 /sys | |
parent | d65e8e4dd30660762cde9673fbbea01943d12779 (diff) |
The condition around uvm_grow() can be simplified, as the error result
adjustment is effectively a dead store
ok kettenis
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sh/sh/trap.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/arch/sh/sh/trap.c b/sys/arch/sh/sh/trap.c index e3422bcb281..b092cc23490 100644 --- a/sys/arch/sh/sh/trap.c +++ b/sys/arch/sh/sh/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.46 2020/10/21 17:54:33 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.47 2020/10/21 19:12:58 deraadt Exp $ */ /* $NetBSD: exception.c,v 1.32 2006/09/04 23:57:52 uwe Exp $ */ /* $NetBSD: syscall.c,v 1.6 2006/03/07 07:21:50 thorpej Exp $ */ @@ -418,12 +418,8 @@ tlb_exception(struct proc *p, struct trapframe *tf, uint32_t va) err = uvm_fault(map, va, 0, access_type); /* User stack extension */ - if (map != kernel_map) { - if (err == 0) - uvm_grow(p, va); - else if (err == EACCES) - err = EFAULT; - } + if (err == 0 && map != kernel_map) + uvm_grow(p, va); /* Page in. load PTE to TLB. */ if (err == 0) { |