Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e161d7c1 authored by Colin Cross's avatar Colin Cross Committed by Mitchel Humpherys
Browse files

ion: convert map_kernel to return ERR_PTR



ion is going to stop accepting NULL as an error value, use ERR_PTR.

Change-Id: I030e8b72138904e38a4a5d225beaaa98427651fb
Signed-off-by: default avatarColin Cross <ccross@android.com>
Git-commit: d37aa151f874563a35d49a0ff0a129ef332c5e9e
Git-repo: http://android.googlesource.com/kernel/common/


[mitchelh@codeaurora.org: conflicts due to msm changes]
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent 7bcea0d5
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 * drivers/gpu/ion/ion_carveout_heap.c
 *
 * Copyright (C) 2011 Google, Inc.
 * Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
@@ -133,6 +133,9 @@ void *ion_carveout_heap_map_kernel(struct ion_heap *heap,
	else
		ret_value = ioremap(buffer->priv_phys, buffer->size);

	if (ret_value == NULL)
		return ERR_PTR(-ENOMEM);

	return ret_value;
}

+3 −0
Original line number Diff line number Diff line
@@ -59,6 +59,9 @@ void *ion_heap_map_kernel(struct ion_heap *heap,
	vaddr = vmap(pages, npages, VM_MAP, pgprot);
	vfree(pages);

	if (vaddr == NULL)
		return ERR_PTR(-ENOMEM);

	return vaddr;
}