Skip to content

Commit

Permalink
mm/dmapool.c: reuse devres_release() to free resources
Browse files Browse the repository at this point in the history
Instead of calling an additional routine in dmam_pool_destroy() rely on
what dmam_pool_release() is doing.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
andy-shev authored and torvalds committed Jun 4, 2014
1 parent fe54b1f commit 172cb4b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/dmapool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 172cb4b

Please sign in to comment.