aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 153dee14fe55..2c5ae338773c 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -79,15 +79,13 @@ static atomic_t call_count = ATOMIC_INIT(1);
79static LIST_HEAD(formats); 79static LIST_HEAD(formats);
80static DEFINE_RWLOCK(binfmt_lock); 80static DEFINE_RWLOCK(binfmt_lock);
81 81
82int __register_binfmt(struct linux_binfmt * fmt, int insert) 82void __register_binfmt(struct linux_binfmt * fmt, int insert)
83{ 83{
84 if (!fmt) 84 BUG_ON(!fmt);
85 return -EINVAL;
86 write_lock(&binfmt_lock); 85 write_lock(&binfmt_lock);
87 insert ? list_add(&fmt->lh, &formats) : 86 insert ? list_add(&fmt->lh, &formats) :
88 list_add_tail(&fmt->lh, &formats); 87 list_add_tail(&fmt->lh, &formats);
89 write_unlock(&binfmt_lock); 88 write_unlock(&binfmt_lock);
90 return 0;
91} 89}
92 90
93EXPORT_SYMBOL(__register_binfmt); 91EXPORT_SYMBOL(__register_binfmt);