selinux: fix sel_write_enforce broken return value

Return a negative error value like the rest of the entries in this function.

Cc: <stable@vger.kernel.org>
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>
[PM: tweaked subject line]
Signed-off-by: Paul Moore <pmoore@redhat.com>
This commit is contained in:
Joe Perches 2015-03-23 18:01:35 -07:00 committed by Paul Moore
parent 04f81f0154
commit 6436a123a1

View File

@ -152,7 +152,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;