From: Dan Williams Date: Tue, 15 Sep 2015 06:37:48 +0000 (-0400) Subject: devm_memunmap: use devres_release() X-Git-Tag: firefly_0821_release~176^2~735^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d741314fe8318c1af497b8cf04ea3976b9509eca;p=firefly-linux-kernel-4.4.55.git devm_memunmap: use devres_release() Remove open coded call to memunmap. Cc: Christoph Hellwig Cc: Ross Zwisler Reviewed-by: Christoph Hellwig Signed-off-by: Dan Williams --- diff --git a/kernel/memremap.c b/kernel/memremap.c index 72b0c66628b6..0756273437e0 100644 --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -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);