Return-Path: Received: from mail-am1on0140.outbound.protection.outlook.com ([157.56.112.140]:10752 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753779AbcDVJbX (ORCPT ); Fri, 22 Apr 2016 05:31:23 -0400 Subject: [PATCH] binfmt_misc: Return a specific error in case of register failed From: Kirill Tkhai To: , , Date: Fri, 22 Apr 2016 08:57:50 +0300 Message-ID: <146130464389.21980.8893125445455714514.stgit@pro> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Currently, -EINVAL is always returned. Return a specific error code in dependence of problem. Signed-off-by: Kirill Tkhai --- fs/binfmt_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }