Commit 96b03179 authored by Ian Kent's avatar Ian Kent Committed by Linus Torvalds

autofs4: collect version check return

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.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: default avatarIan Kent <raven@themaw.net>
Signed-off-by: default avatarJeff Moyer <jmoyer@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent bc9c4068
...@@ -128,9 +128,10 @@ static inline void free_dev_ioctl(struct autofs_dev_ioctl *param) ...@@ -128,9 +128,10 @@ static inline void free_dev_ioctl(struct autofs_dev_ioctl *param)
*/ */
static int validate_dev_ioctl(int cmd, 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)) { err = check_dev_ioctl_version(cmd, param);
if (err) {
AUTOFS_WARN("invalid device control module version " AUTOFS_WARN("invalid device control module version "
"supplied for cmd(0x%08x)", cmd); "supplied for cmd(0x%08x)", cmd);
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment