[PATCH 1/3] AVR32: Return directly after a failed access_ok() in setup_rt_frame()

From: SF Markus Elfring
Date: Wed Jan 18 2017 - 08:53:24 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 18 Jan 2017 13:50:38 +0100

Return directly after a call of the function "access_ok" failed
at the beginning.

Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
arch/avr32/kernel/signal.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c
index 8f1c63b9b983..13c31a7b9ae4 100644
--- a/arch/avr32/kernel/signal.c
+++ b/arch/avr32/kernel/signal.c
@@ -141,9 +141,8 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs)
int err = 0;

frame = get_sigframe(ksig, regs, sizeof(*frame));
- err = -EFAULT;
if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))
- goto out;
+ return -EFAULT;

/*
* Set up the return code:
--
2.11.0