int nf_conntrack_register_notifier(struct net *net,
                                   struct nf_ct_event_notifier *new)
 {
-       int ret = 0;
+       int ret;
        struct nf_ct_event_notifier *notify;
 
        mutex_lock(&nf_ct_ecache_mutex);
                goto out_unlock;
        }
        rcu_assign_pointer(net->ct.nf_conntrack_event_cb, new);
-       mutex_unlock(&nf_ct_ecache_mutex);
-       return ret;
+       ret = 0;
 
 out_unlock:
        mutex_unlock(&nf_ct_ecache_mutex);
 int nf_ct_expect_register_notifier(struct net *net,
                                   struct nf_exp_event_notifier *new)
 {
-       int ret = 0;
+       int ret;
        struct nf_exp_event_notifier *notify;
 
        mutex_lock(&nf_ct_ecache_mutex);
                goto out_unlock;
        }
        rcu_assign_pointer(net->ct.nf_expect_event_cb, new);
-       mutex_unlock(&nf_ct_ecache_mutex);
-       return ret;
+       ret = 0;
 
 out_unlock:
        mutex_unlock(&nf_ct_ecache_mutex);