diff mbox

[v3.5,1/2] aarch64: Fix error return from __ioctl

Message ID 1401383078-32544-2-git-send-email-rth@twiddle.net
State New
Headers show

Commit Message

Richard Henderson May 29, 2014, 5:04 p.m. UTC
From: Richard Henderson <rth@redhat.com>

Forgotten in ca3cfa40c16ef34c74951a07a57cfcbcd58898b1
where the error branch was moved from PSEUDO_RET.
---
 sysdeps/unix/sysv/linux/aarch64/ioctl.S | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

Comments

Marcus Shawcroft May 29, 2014, 7:01 p.m. UTC | #1
On 29 May 2014 18:04, Richard Henderson <rth@twiddle.net> wrote:
> From: Richard Henderson <rth@redhat.com>
>
> Forgotten in ca3cfa40c16ef34c74951a07a57cfcbcd58898b1
> where the error branch was moved from PSEUDO_RET.

Looks OK.
/Marcus
diff mbox

Patch

diff --git a/sysdeps/unix/sysv/linux/aarch64/ioctl.S b/sysdeps/unix/sysv/linux/aarch64/ioctl.S
index 4443f5a..8920a20 100644
--- a/sysdeps/unix/sysv/linux/aarch64/ioctl.S
+++ b/sysdeps/unix/sysv/linux/aarch64/ioctl.S
@@ -20,11 +20,12 @@ 
 
 	.text
 ENTRY(__ioctl)
-	movz	x8, #__NR_ioctl
-        sxtw	x0, w0
-        svc	#0x0
-	cmn	x0, #0x1, lsl #12
-	PSEUDO_RET
-	PSEUDO_END (__ioctl)
+	mov	x8, #__NR_ioctl
+	sxtw	x0, w0
+	svc	#0x0
+	cmn	x0, #4095
+	b.cs	.Lsyscall_error
+	ret
+PSEUDO_END (__ioctl)
 
 weak_alias (__ioctl, ioctl)