lec: Fix bug introduced by b67bfe0d42cac56c512dd5da4b1b347a23f4b70a
[firefly-linux-kernel-4.4.55.git] / net / netfilter / core.c
index 1fbab0cdd302bdafe199d434fc10f2f6401ef6a8..a93c97f106d4a5022cd0e1196ee70ecdfd8c2873 100644 (file)
@@ -35,11 +35,7 @@ EXPORT_SYMBOL_GPL(nf_ipv6_ops);
 
 int nf_register_afinfo(const struct nf_afinfo *afinfo)
 {
-       int err;
-
-       err = mutex_lock_interruptible(&afinfo_mutex);
-       if (err < 0)
-               return err;
+       mutex_lock(&afinfo_mutex);
        RCU_INIT_POINTER(nf_afinfo[afinfo->family], afinfo);
        mutex_unlock(&afinfo_mutex);
        return 0;
@@ -68,11 +64,8 @@ static DEFINE_MUTEX(nf_hook_mutex);
 int nf_register_hook(struct nf_hook_ops *reg)
 {
        struct nf_hook_ops *elem;
-       int err;
 
-       err = mutex_lock_interruptible(&nf_hook_mutex);
-       if (err < 0)
-               return err;
+       mutex_lock(&nf_hook_mutex);
        list_for_each_entry(elem, &nf_hooks[reg->pf][reg->hooknum], list) {
                if (reg->priority < elem->priority)
                        break;