Skip to content

Commit

Permalink
devm_memunmap: use devres_release()
Browse files Browse the repository at this point in the history
Remove open coded call to memunmap.

Cc: Christoph Hellwig <[email protected]>
Cc: Ross Zwisler <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
  • Loading branch information
djbw committed Oct 9, 2015
1 parent a639315 commit d741314
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kernel/memremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit d741314

Please sign in to comment.