summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-16 23:01:49 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-16 23:01:49 -0800
commit4d24b52ac5085ef8a264d044f1b302b7c029887a (patch)
tree3842c484d49f97bc441ef9e6a31de09fa2f683f5 /net/sched
parent6eba6a372b501aa3cdfb7df21a8364099125b9c4 (diff)
downloadtalos-obmc-linux-4d24b52ac5085ef8a264d044f1b302b7c029887a.tar.gz
talos-obmc-linux-4d24b52ac5085ef8a264d044f1b302b7c029887a.zip
ematch: simpler tcf_em_unregister()
Simply delete ops from list and let list debugging do the job. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-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 @@
*
* static void __exit exit_my_ematch(void)
* {
- * return tcf_em_unregister(&my_ops);
+ * tcf_em_unregister(&my_ops);
* }
*
* module_init(init_my_ematch);
@@ -154,23 +154,11 @@ EXPORT_SYMBOL(tcf_em_register);
*
* Returns -ENOENT if no matching ematch was found.
*/
-int tcf_em_unregister(struct tcf_ematch_ops *ops)
+void tcf_em_unregister(struct tcf_ematch_ops *ops)
{
- int err = 0;
- struct tcf_ematch_ops *e;
-
write_lock(&ematch_mod_lock);
- list_for_each_entry(e, &ematch_ops, link) {
- if (e == ops) {
- list_del(&e->link);
- goto out;
- }
- }
-
- err = -ENOENT;
-out:
+ list_del(&ops->link);
write_unlock(&ematch_mod_lock);
- return err;
}
EXPORT_SYMBOL(tcf_em_unregister);
OpenPOWER on IntegriCloud