Skip to content

Commit

Permalink
livepatch: core: Return EOPNOTSUPP instead of ENOSYS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
aliceinwire authored and pmladek committed Feb 6, 2019
1 parent bae0543 commit 375bfca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/livepatch/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down

0 comments on commit 375bfca

Please sign in to comment.