Commit 5090a4bc authored by Piro Yang's avatar Piro Yang Committed by Greg Kroah-Hartman

staging: vme_user: Fix the issue of return the wrong error code

Fix the issue of returning the -ENOSYS error code when an error occurs.

The error code of -ENOSYS indicates Invalid system call number, but
there is not system call error. So replace -ENOSYS error code by the
return -EINVAL error code.
Signed-off-by: default avatarPiro Yang <piroyangg@gmail.com>
Link: https://lore.kernel.org/r/20231219170447.51237-1-piroyangg@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7f2c9c0b
...@@ -341,7 +341,7 @@ int vme_slave_set(struct vme_resource *resource, int enabled, ...@@ -341,7 +341,7 @@ int vme_slave_set(struct vme_resource *resource, int enabled,
if (!bridge->slave_set) { if (!bridge->slave_set) {
dev_err(bridge->parent, "Function not supported\n"); dev_err(bridge->parent, "Function not supported\n");
return -ENOSYS; return -EINVAL;
} }
if (!(((image->address_attr & aspace) == aspace) && if (!(((image->address_attr & aspace) == aspace) &&
......
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