Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec...
[firefly-linux-kernel-4.4.55.git] / security / selinux / netnode.c
index dc92792271f1d8e59e01e9f4e9000d4f0090b2c0..3618251d0fdb4435dfb96be2c845c0727deca04d 100644 (file)
@@ -141,6 +141,7 @@ static struct sel_netnode *sel_netnode_find(const void *addr, u16 family)
                break;
        default:
                BUG();
+               return NULL;
        }
 
        list_for_each_entry_rcu(node, &sel_netnode_hash[idx].list, list)
@@ -183,8 +184,6 @@ static void sel_netnode_insert(struct sel_netnode *node)
                BUG();
        }
 
-       INIT_RCU_HEAD(&node->rcu);
-
        /* we need to impose a limit on the growth of the hash table so check
         * this bucket to make sure it is within the specified bounds */
        list_add_rcu(&node->list, &sel_netnode_hash[idx].list);