diff mbox

binfmt_misc: Return a specific error in case of register failed

Message ID 146130464389.21980.8893125445455714514.stgit@pro (mailing list archive)
State New, archived
Headers show

Commit Message

Kirill Tkhai April 22, 2016, 5:57 a.m. UTC
Currently, -EINVAL is always returned. Return a specific error code
in dependence of problem.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 fs/binfmt_misc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index 3a3ced7..da64365 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -716,7 +716,7 @@  static ssize_t bm_register_write(struct file *file, const char __user *buffer,
 
 	if (err) {
 		kfree(e);
-		return -EINVAL;
+		return err;
 	}
 	return count;
 }