From b0fbd2fba7fe978ad75654f2ca191bd506b6a693 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 14 May 2014 10:02:14 +1000 Subject: [PATCH] mm/dmapool.c: reuse devres_release() to free resources Instead of calling an additional routine in dmam_pool_destroy() rely on what dmam_pool_release() is doing. Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton --- mm/dmapool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/dmapool.c b/mm/dmapool.c index 38dfcddc0595..9bc33f88fa90 100644 --- a/mm/dmapool.c +++ b/mm/dmapool.c @@ -500,7 +500,6 @@ void dmam_pool_destroy(struct dma_pool *pool) { struct device *dev = pool->dev; - WARN_ON(devres_destroy(dev, dmam_pool_release, dmam_pool_match, pool)); - dma_pool_destroy(pool); + WARN_ON(devres_release(dev, dmam_pool_release, dmam_pool_match, pool)); } EXPORT_SYMBOL(dmam_pool_destroy); -- 2.39.5