aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/ematch.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/ematch.c')
-rw-r--r--net/sched/ematch.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index e82519e548d7..aab59409728b 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -71,7 +71,7 @@
71 * 71 *
72 * static void __exit exit_my_ematch(void) 72 * static void __exit exit_my_ematch(void)
73 * { 73 * {
74 * return tcf_em_unregister(&my_ops); 74 * tcf_em_unregister(&my_ops);
75 * } 75 * }
76 * 76 *
77 * module_init(init_my_ematch); 77 * module_init(init_my_ematch);
@@ -154,23 +154,11 @@ EXPORT_SYMBOL(tcf_em_register);
154 * 154 *
155 * Returns -ENOENT if no matching ematch was found. 155 * Returns -ENOENT if no matching ematch was found.
156 */ 156 */
157int tcf_em_unregister(struct tcf_ematch_ops *ops) 157void tcf_em_unregister(struct tcf_ematch_ops *ops)
158{ 158{
159 int err = 0;
160 struct tcf_ematch_ops *e;
161
162 write_lock(&ematch_mod_lock); 159 write_lock(&ematch_mod_lock);
163 list_for_each_entry(e, &ematch_ops, link) { 160 list_del(&ops->link);
164 if (e == ops) {
165 list_del(&e->link);
166 goto out;
167 }
168 }
169
170 err = -ENOENT;
171out:
172 write_unlock(&ematch_mod_lock); 161 write_unlock(&ematch_mod_lock);
173 return err;
174} 162}
175EXPORT_SYMBOL(tcf_em_unregister); 163EXPORT_SYMBOL(tcf_em_unregister);
176 164