Commit 96b0317906690997c16c7efffbc4c0fafcd6f7f2
Committed by
Linus Torvalds
1 parent
bc9c406838
Exists in
master
and in
7 other branches
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: Ian Kent <raven@themaw.net> Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
fs/autofs4/dev-ioctl.c
... | ... | @@ -128,9 +128,10 @@ |
128 | 128 | */ |
129 | 129 | static int validate_dev_ioctl(int cmd, struct autofs_dev_ioctl *param) |
130 | 130 | { |
131 | - int err = -EINVAL; | |
131 | + int err; | |
132 | 132 | |
133 | - if (check_dev_ioctl_version(cmd, param)) { | |
133 | + err = check_dev_ioctl_version(cmd, param); | |
134 | + if (err) { | |
134 | 135 | AUTOFS_WARN("invalid device control module version " |
135 | 136 | "supplied for cmd(0x%08x)", cmd); |
136 | 137 | goto out; |