selinux: fix sel_write_enforce broken return value
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / security / selinux / selinuxfs.c
index ff427733c2903cab275a05da0887478850e1e374..464be51025f6c2c11ac21aea3e7a7078adec0872 100644 (file)
@@ -150,7 +150,7 @@ static ssize_t sel_write_enforce(struct file *file, const char __user *buf,
                goto out;
 
        /* No partial writes. */
-       length = EINVAL;
+       length = -EINVAL;
        if (*ppos != 0)
                goto out;