diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2014-06-04 16:10:02 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 16:54:08 -0700 |
commit | 172cb4b3d49a1339dd67ee05e3f47972a70f556f (patch) | |
tree | 6e781deefd68777b8408be556f403a807f1cdc49 /mm | |
parent | fe54b1fd49b712cd94a1846e993a515fc9394dcb (diff) |
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 <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/dmapool.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/dmapool.c b/mm/dmapool.c index a3a1bfe9111..306baa594f9 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); |