]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: EXYNOS: Use IOMEM_ERR_PTR when function returns iomem
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Fri, 10 Jul 2015 10:20:58 +0000 (19:20 +0900)
committerKukjin Kim <kgene@kernel.org>
Tue, 21 Jul 2015 04:19:06 +0000 (13:19 +0900)
Function returns 'void __iomem *' so use IOMEM_ERR_PTR for returning
an error. This fixes sparse warning:

arch/arm/mach-exynos/platsmp.c:185:31: warning: incorrect type in return expression (different address spaces)
arch/arm/mach-exynos/platsmp.c:185:31:    expected void [noderef] <asn:2>*
arch/arm/mach-exynos/platsmp.c:185:31:    got void *

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
arch/arm/mach-exynos/platsmp.c

index 58e05a2eae5737c1a558c3658e692184b064da34..98a2c0cbb833490077675200d3283f2084233f66 100644 (file)
@@ -182,7 +182,7 @@ static inline void __iomem *cpu_boot_reg(int cpu)
 
        boot_reg = cpu_boot_reg_base();
        if (!boot_reg)
-               return ERR_PTR(-ENODEV);
+               return IOMEM_ERR_PTR(-ENODEV);
        if (soc_is_exynos4412())
                boot_reg += 4*cpu;
        else if (soc_is_exynos5420() || soc_is_exynos5800())