]> err.no Git - linux-2.6/blobdiff - net/netlabel/netlabel_domainhash.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[linux-2.6] / net / netlabel / netlabel_domainhash.c
index 9a8ea0195c4fbc2f08bb8c55a5535ae43889c809..02c2f7c0b255f22253746f3a48734203fed41456 100644 (file)
@@ -150,11 +150,11 @@ static struct netlbl_dom_map *netlbl_domhsh_search_def(const char *domain)
        entry = netlbl_domhsh_search(domain);
        if (entry == NULL) {
                entry = rcu_dereference(netlbl_domhsh_def);
-               if (entry != NULL && entry->valid)
-                       return entry;
+               if (entry != NULL && !entry->valid)
+                       entry = NULL;
        }
 
-       return NULL;
+       return entry;
 }
 
 /*
@@ -171,7 +171,7 @@ static struct netlbl_dom_map *netlbl_domhsh_search_def(const char *domain)
  * values on error.
  *
  */
-int netlbl_domhsh_init(u32 size)
+int __init netlbl_domhsh_init(u32 size)
 {
        u32 iter;
        struct netlbl_domhsh_tbl *hsh_tbl;