Commit f6b450d4 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds

Make unregister_binfmt() return void

list_del() hardly can fail, so checking for return value is pointless
(and current code always return 0).

Nobody really cared that return value anyway.
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e4dc1b14
...@@ -240,7 +240,7 @@ static int __init check_elf32_binfmt(void) ...@@ -240,7 +240,7 @@ static int __init check_elf32_binfmt(void)
{ {
if (cpu_uses_ia32el()) { if (cpu_uses_ia32el()) {
printk("Please use IA-32 EL for executing IA-32 binaries\n"); printk("Please use IA-32 EL for executing IA-32 binaries\n");
return unregister_binfmt(&elf_format); unregister_binfmt(&elf_format);
} }
return 0; return 0;
} }
......
...@@ -81,12 +81,11 @@ int register_binfmt(struct linux_binfmt * fmt) ...@@ -81,12 +81,11 @@ int register_binfmt(struct linux_binfmt * fmt)
EXPORT_SYMBOL(register_binfmt); EXPORT_SYMBOL(register_binfmt);
int unregister_binfmt(struct linux_binfmt * fmt) void unregister_binfmt(struct linux_binfmt * fmt)
{ {
write_lock(&binfmt_lock); write_lock(&binfmt_lock);
list_del(&fmt->lh); list_del(&fmt->lh);
write_unlock(&binfmt_lock); write_unlock(&binfmt_lock);
return 0;
} }
EXPORT_SYMBOL(unregister_binfmt); EXPORT_SYMBOL(unregister_binfmt);
......
...@@ -73,7 +73,7 @@ struct linux_binfmt { ...@@ -73,7 +73,7 @@ struct linux_binfmt {
}; };
extern int register_binfmt(struct linux_binfmt *); extern int register_binfmt(struct linux_binfmt *);
extern int unregister_binfmt(struct linux_binfmt *); extern void unregister_binfmt(struct linux_binfmt *);
extern int prepare_binprm(struct linux_binprm *); extern int prepare_binprm(struct linux_binprm *);
extern int __must_check remove_arg_zero(struct linux_binprm *); extern int __must_check remove_arg_zero(struct linux_binprm *);
......
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