summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/fcntl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 30f47d0f74a0..e15bcc4265d0 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -632,9 +632,8 @@ COMPAT_SYSCALL_DEFINE3(fcntl64, unsigned int, fd, unsigned int, cmd,
if (err)
break;
err = fixup_compat_flock(&flock);
- if (err)
- return err;
- err = put_compat_flock(&flock, compat_ptr(arg));
+ if (!err)
+ err = put_compat_flock(&flock, compat_ptr(arg));
break;
case F_GETLK64:
case F_OFD_GETLK: