]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ARM: imx: flag failure of of_iomap
authorNicholas Mc Guire <hofrat@osadl.org>
Sun, 8 Jul 2018 08:32:54 +0000 (10:32 +0200)
committerShawn Guo <shawnguo@kernel.org>
Wed, 11 Jul 2018 12:47:37 +0000 (20:47 +0800)
 imx_set_aips is assuming that the address returned from of_iomap is
valid which it probably is in the normal case - as the call site
is void error propagation is not possible but never the less at least
a WARN_ON() seems warranted here.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes: commit e57e4ab5fc2e ("ARM: i.MX: allow disabling supervisor protect via DT")
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/mach-imx/cpu.c

index 32969f34486a54933dfbed32c91740287269d833..c6b1bf97a6c16e4e1bfcd4237362f5270323189b 100644 (file)
@@ -68,6 +68,7 @@ void __init imx_aips_allow_unprivileged_access(
 
        for_each_compatible_node(np, NULL, compat) {
                aips_base_addr = of_iomap(np, 0);
+               WARN_ON(!aips_base_addr);
                imx_set_aips(aips_base_addr);
        }
 }