From 0c1796cc06f9317d537367578e1892286838221c Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 15 May 2021 20:20:35 +0000 Subject: [PATCH] in kdata_abort, error must be initialized to 0 (like arm64) spotted by drahn --- sys/arch/riscv64/riscv64/trap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/riscv64/riscv64/trap.c b/sys/arch/riscv64/riscv64/trap.c index 5ce5381d4a8..9845eedf73d 100644 --- a/sys/arch/riscv64/riscv64/trap.c +++ b/sys/arch/riscv64/riscv64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.11 2021/05/15 20:12:24 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.12 2021/05/15 20:20:35 deraadt Exp $ */ /* * Copyright (c) 2020 Shivam Waghela @@ -275,7 +275,7 @@ kdata_abort(struct trapframe *frame) vm_prot_t access_type = accesstype(frame); vaddr_t va; struct proc *p; - int error; + int error = 0; pcb = curcpu()->ci_curpcb; p = curcpu()->ci_curproc; -- 2.20.1