From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Kent Subject: [PATCH 3/6] autofs4 - collect version check return Date: Thu, 23 Oct 2008 10:35:27 +0800 Message-ID: <20081023023527.4508.10819.stgit@raven.themaw.net> References: <20081023023513.4508.54940.stgit@raven.themaw.net> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Kernel Mailing List , linux-fsdevel , autofs mailing list To: Andrew Morton Return-path: Received: from outbound.icp-qv1-irony-out3.iinet.net.au ([203.59.1.148]:44454 "EHLO outbound.icp-qv1-irony-out3.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752107AbYJWCfa (ORCPT ); Wed, 22 Oct 2008 22:35:30 -0400 In-Reply-To: <20081023023513.4508.54940.stgit@raven.themaw.net> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: The function check_dev_ioctl_version() returns an error code upon fail but it isn't captured and returned in validate_dev_ioctl() as it should be. Signed-off-by: Ian Kent Signed-off-by: Jeff Moyer --- fs/autofs4/dev-ioctl.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index 304c1ff..63bfb5d 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-ioctl.c @@ -116,9 +116,9 @@ static inline void free_dev_ioctl(struct autofs_dev_ioctl *param) */ static int validate_dev_ioctl(int cmd, struct autofs_dev_ioctl *param) { - int err = -EINVAL; + int err; - if (check_dev_ioctl_version(cmd, param)) { + if ((err = check_dev_ioctl_version(cmd, param))) { AUTOFS_WARN("invalid device control module version " "supplied for cmd(0x%08x)", cmd); goto out;