projects/linux·commit f6b450d4

Make unregister_binfmt() return void

f6b450d4 · Alexey Dobriyan <[email protected]> · 2007-10-16 23:26:04 -07:00

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: Alexey Dobriyan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
f6b450d489f2fb4e909447beacad64edb8aa0cda
Parents
e4dc1b14

Changes

3 files changed · +3 −4

FileStatusAddDelContent
arch/ia64/ia32/binfmt_elf32.cmodified+1−1View file
fs/exec.cmodified+1−2View file
include/linux/binfmts.hmodified+1−1View file

arch/ia64/ia32/binfmt_elf32.c

View file
diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c
index 1cfab32..f6ae3ec 100644
--- a/arch/ia64/ia32/binfmt_elf32.c
+++ b/arch/ia64/ia32/binfmt_elf32.c
@@ -240,7 +240,7 @@ static int __init check_elf32_binfmt(void)
{
if (cpu_uses_ia32el()) {
printk("Please use IA-32 EL for executing IA-32 binaries\n");
- return unregister_binfmt(&elf_format);
+ unregister_binfmt(&elf_format);
}
return 0;
}

fs/exec.c

View file
diff --git a/fs/exec.c b/fs/exec.c
index 65825bd..550ae9b 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -81,12 +81,11 @@ int register_binfmt(struct linux_binfmt * fmt)
EXPORT_SYMBOL(register_binfmt);
-int unregister_binfmt(struct linux_binfmt * fmt)
+void unregister_binfmt(struct linux_binfmt * fmt)
{
write_lock(&binfmt_lock);
list_del(&fmt->lh);
write_unlock(&binfmt_lock);
- return 0;
}
EXPORT_SYMBOL(unregister_binfmt);

include/linux/binfmts.h

View file
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index 6b834dc..63d5436 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -73,7 +73,7 @@ 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 __must_check remove_arg_zero(struct linux_binprm *);