summaryrefslogtreecommitdiffstats
path: root/kernel/memremap.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2015-09-15 02:42:20 -0400
committerDan Williams <dan.j.williams@intel.com>2015-10-09 17:00:33 -0400
commitb36f47617f6ce7c5e8e7c264b9d9ea0654d9f20a (patch)
treed08894bd10818244ad58444151f201eacc6fa5a7 /kernel/memremap.c
parentd741314fe8318c1af497b8cf04ea3976b9509eca (diff)
downloadop-kernel-dev-b36f47617f6ce7c5e8e7c264b9d9ea0654d9f20a.zip
op-kernel-dev-b36f47617f6ce7c5e8e7c264b9d9ea0654d9f20a.tar.gz
devm_memremap: convert to return ERR_PTR
Make devm_memremap consistent with the error return scheme of devm_memremap_pages to remove special casing in the pmem driver. 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>
Diffstat (limited to 'kernel/memremap.c')
-rw-r--r--kernel/memremap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/memremap.c b/kernel/memremap.c
index 0756273..0d818ce 100644
--- a/kernel/memremap.c
+++ b/kernel/memremap.c
@@ -116,7 +116,7 @@ void *devm_memremap(struct device *dev, resource_size_t offset,
ptr = devres_alloc(devm_memremap_release, sizeof(*ptr), GFP_KERNEL);
if (!ptr)
- return NULL;
+ return ERR_PTR(-ENOMEM);
addr = memremap(offset, size, flags);
if (addr) {
OpenPOWER on IntegriCloud