aboutsummaryrefslogtreecommitdiff
path: root/linux-user/sparc
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-11-06 15:27:36 +0000
committerLaurent Vivier <laurent@vivier.eu>2020-12-18 11:23:29 +0100
commit309abce23658c0142430440c7ad1be2a02170ed0 (patch)
treed24d64654f60c7683afda9967d0ebc93b85ef944 /linux-user/sparc
parent246ff44295d0153d1d272b4d4a77c4bf9cc6ad66 (diff)
linux-user/sparc: Remove unneeded checks of 'err' from sparc64_get_context()
Unlike the kernel macros, our __get_user() and __put_user() do not return a failure code. Kernel code typically has a style of err |= __get_user(...); err |= __get_user(...); and then checking err at the end. In sparc64_get_context() our version of the code dropped the accumulating into err but left the "if (err) goto do_sigsegv" checks, which will never be taken. Delete unnecessary if()s. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20201106152738.26026-3-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/sparc')
-rw-r--r--linux-user/sparc/signal.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c
index 0057b48fad..58b48afe29 100644
--- a/linux-user/sparc/signal.c
+++ b/linux-user/sparc/signal.c
@@ -555,8 +555,6 @@ void sparc64_get_context(CPUSPARCState *env)
for (i = 0; i < TARGET_NSIG_WORDS; i++, dst++, src++) {
__put_user(*src, dst);
}
- if (err)
- goto do_sigsegv;
}
/* XXX: tstate must be saved properly */
@@ -598,8 +596,6 @@ void sparc64_get_context(CPUSPARCState *env)
* hidden behind an "if (fenab)" where fenab is always 0).
*/
- if (err)
- goto do_sigsegv;
unlock_user_struct(ucp, ucp_addr, 1);
return;
do_sigsegv: