livepatch: core: Return EOPNOTSUPP instead of ENOSYS

As a result of an unsupported operation is better to use EOPNOTSUPP
as error code.
ENOSYS is only used for 'invalid syscall nr' and nothing else.

Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
This commit is contained in:
Alice Ferrazzi 2019-02-05 03:33:28 +09:00 committed by Petr Mladek
parent bae054372a
commit 375bfca345
1 changed files with 1 additions and 1 deletions

View File

@ -1036,7 +1036,7 @@ int klp_enable_patch(struct klp_patch *patch)
if (!klp_have_reliable_stack()) {
pr_err("This architecture doesn't have support for the livepatch consistency model.\n");
return -ENOSYS;
return -EOPNOTSUPP;
}