From 0c8a3a1a3dc651d06573209fc5d8c0d4fed33c47 Mon Sep 17 00:00:00 2001 From: Mitchel Humpherys Date: Thu, 2 Apr 2015 12:41:37 -0700 Subject: [PATCH] arm64: dma-mapping: use ERR_PTR instead of NULL in stub The real arm_iommu_create_mapping function returns an ERR_PTR (not NULL) on failure. Make the stub version match that convention. Change-Id: I1df954ee5b9037778f27fba2e626621740abf782 Signed-off-by: Mitchel Humpherys --- arch/arm64/include/asm/dma-iommu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/dma-iommu.h b/arch/arm64/include/asm/dma-iommu.h index 4bba210fb51a..db51643163f2 100644 --- a/arch/arm64/include/asm/dma-iommu.h +++ b/arch/arm64/include/asm/dma-iommu.h @@ -40,7 +40,7 @@ static inline struct dma_iommu_mapping * arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t size, int order) { - return NULL; + return ERR_PTR(-ENOMEM); } static inline void arm_iommu_release_mapping(struct dma_iommu_mapping *mapping)