Merge tag 'nios2-v4.2' of git://git.rocketboards.org/linux-socfpga-next
[firefly-linux-kernel-4.4.55.git] / lib / rhashtable.c
index 4396434e471536b4772ef06efcb983f87c580889..a60a6d335a91a6aa90f019f77062e7be069939fd 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/random.h>
 #include <linux/rhashtable.h>
 #include <linux/err.h>
+#include <linux/export.h>
 
 #define HASH_DEFAULT_SIZE      64UL
 #define HASH_MIN_SIZE          4U
@@ -584,7 +585,6 @@ void *rhashtable_walk_next(struct rhashtable_iter *iter)
        struct bucket_table *tbl = iter->walker->tbl;
        struct rhashtable *ht = iter->ht;
        struct rhash_head *p = iter->p;
-       void *obj = NULL;
 
        if (p) {
                p = rht_dereference_bucket_rcu(p->next, tbl, iter->slot);
@@ -604,8 +604,7 @@ next:
                if (!rht_is_a_nulls(p)) {
                        iter->skip++;
                        iter->p = p;
-                       obj = rht_obj(ht, p);
-                       goto out;
+                       return rht_obj(ht, p);
                }
 
                iter->skip = 0;
@@ -623,9 +622,7 @@ next:
 
        iter->p = NULL;
 
-out:
-
-       return obj;
+       return NULL;
 }
 EXPORT_SYMBOL_GPL(rhashtable_walk_next);