Skip to contentSkip to conversation

binfmt_misc: Return a specific error in case of register failed

PATCH New Kirill Tkhai 1 participant 1 message Apr 22, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 binfmt_misc: Return a specific error in case of register failed

Currently, -EINVAL is always returned. Return a specific error code in dependence of problem.

---
 fs/binfmt_misc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/binfmt_misc.c +1 -1
index 3a3ced7..da64365 100644
@@ -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;
 }