]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - lib/rhashtable.c
Merge remote-tracking branches 'regulator/fix/88pm800', 'regulator/fix/max8973',...
[karo-tx-linux.git] / lib / rhashtable.c
index 8609378e6505123a3688e0e95a18cdde013e278a..cc0c69710dcf8a2c7474b759be72e8fa22c2ca1f 100644 (file)
@@ -585,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);
@@ -605,13 +604,14 @@ 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;
        }
 
+       iter->p = NULL;
+
        /* Ensure we see any new tables. */
        smp_rmb();
 
@@ -622,11 +622,7 @@ next:
                return ERR_PTR(-EAGAIN);
        }
 
-       iter->p = NULL;
-
-out:
-
-       return obj;
+       return NULL;
 }
 EXPORT_SYMBOL_GPL(rhashtable_walk_next);