devm_memunmap: use devres_release()
authorDan Williams <dan.j.williams@intel.com>
Tue, 15 Sep 2015 06:37:48 +0000 (02:37 -0400)
committerDan Williams <dan.j.williams@intel.com>
Fri, 9 Oct 2015 21:00:33 +0000 (17:00 -0400)
Remove open coded call to memunmap.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
kernel/memremap.c

index 72b0c66628b6b3db589ad0cd6ed6533edb68a9ea..0756273437e04f1123608270cb7631f316bb2969 100644 (file)
@@ -131,9 +131,8 @@ EXPORT_SYMBOL(devm_memremap);
 
 void devm_memunmap(struct device *dev, void *addr)
 {
-       WARN_ON(devres_destroy(dev, devm_memremap_release, devm_memremap_match,
-                              addr));
-       memunmap(addr);
+       WARN_ON(devres_release(dev, devm_memremap_release,
+                               devm_memremap_match, addr));
 }
 EXPORT_SYMBOL(devm_memunmap);