selinux: fix sel_write_enforce broken return value

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

Cc: <[email protected]>
Signed-off-by: Joe Perches <[email protected]>
Acked-by:  Stephen Smalley <[email protected]>
[PM: tweaked subject line]
Signed-off-by: Paul Moore <[email protected]>
This commit is contained in:
Joe Perches 2015-03-23 18:01:35 -07:00 • committed by Paul Moore
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;