]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/dmapool.c: reuse devres_release() to free resources
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 14 May 2014 00:02:14 +0000 (10:02 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 May 2014 00:02:14 +0000 (10:02 +1000)
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>
mm/dmapool.c

index 38dfcddc0595eaab80fb5a120e1a7367a508cea6..9bc33f88fa905c8083c82502c5e57d36eea0df96 100644 (file)
@@ -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);