xref: /openbmc/linux/arch/riscv/lib/error-inject.c (revision ee55ff80)
1*ee55ff80SGuo Ren // SPDX-License-Identifier: GPL-2.0
2*ee55ff80SGuo Ren 
3*ee55ff80SGuo Ren #include <linux/error-injection.h>
4*ee55ff80SGuo Ren #include <linux/kprobes.h>
5*ee55ff80SGuo Ren 
override_function_with_return(struct pt_regs * regs)6*ee55ff80SGuo Ren void override_function_with_return(struct pt_regs *regs)
7*ee55ff80SGuo Ren {
8*ee55ff80SGuo Ren 	instruction_pointer_set(regs, regs->ra);
9*ee55ff80SGuo Ren }
10*ee55ff80SGuo Ren NOKPROBE_SYMBOL(override_function_with_return);
11