aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/genalloc.c1
-rw-r--r--lib/rhashtable.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/genalloc.c b/lib/genalloc.c
index bdb9a456bcbb..38d2db82228c 100644
--- a/lib/genalloc.c
+++ b/lib/genalloc.c
@@ -588,6 +588,7 @@ struct gen_pool *of_get_named_gen_pool(struct device_node *np,
588 if (!np_pool) 588 if (!np_pool)
589 return NULL; 589 return NULL;
590 pdev = of_find_device_by_node(np_pool); 590 pdev = of_find_device_by_node(np_pool);
591 of_node_put(np_pool);
591 if (!pdev) 592 if (!pdev)
592 return NULL; 593 return NULL;
593 return dev_get_gen_pool(&pdev->dev); 594 return dev_get_gen_pool(&pdev->dev);
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 25f14c586ad7..3943e14da628 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -592,13 +592,13 @@ EXPORT_SYMBOL_GPL(rhashtable_init);
592 * rhashtable_destroy - destroy hash table 592 * rhashtable_destroy - destroy hash table
593 * @ht: the hash table to destroy 593 * @ht: the hash table to destroy
594 * 594 *
595 * Frees the bucket array. 595 * Frees the bucket array. This function is not rcu safe, therefore the caller
596 * has to make sure that no resizing may happen by unpublishing the hashtable
597 * and waiting for the quiescent cycle before releasing the bucket array.
596 */ 598 */
597void rhashtable_destroy(const struct rhashtable *ht) 599void rhashtable_destroy(const struct rhashtable *ht)
598{ 600{
599 const struct bucket_table *tbl = rht_dereference(ht->tbl, ht); 601 bucket_table_free(ht->tbl);
600
601 bucket_table_free(tbl);
602} 602}
603EXPORT_SYMBOL_GPL(rhashtable_destroy); 603EXPORT_SYMBOL_GPL(rhashtable_destroy);
604 604