[regression] fix braino in fs/dlm/user.c
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 21 Jan 2016 22:41:23 +0000 (17:41 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 21 Jan 2016 22:45:15 +0000 (17:45 -0500)
it's "bugger off if we got ERR_PTR", not the other way round...

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dlm/user.c

index 1925d6d222b87f635b9925e05003a3c7c41d7580..58c2f4a21b7f4233b34b70efb0602b297d7f9012 100644 (file)
@@ -516,7 +516,7 @@ static ssize_t device_write(struct file *file, const char __user *buf,
                return -EINVAL;
 
        kbuf = memdup_user_nul(buf, count);
-       if (!IS_ERR(kbuf))
+       if (IS_ERR(kbuf))
                return PTR_ERR(kbuf);
 
        if (check_version(kbuf)) {