* [PATCH] ARM: imx: flag failure of of_iomap
@ 2018-07-08 8:32 Nicholas Mc Guire
2018-07-11 12:47 ` Shawn Guo
0 siblings, 1 reply; 3+ messages in thread
From: Nicholas Mc Guire @ 2018-07-08 8:32 UTC (permalink / raw)
To: Steffen Trumtrar
Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team, Russell King, linux-arm-kernel, linux-kernel,
Nicholas Mc Guire
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")
---
Problem found by experimental coccinelle script
Patch was compiletested with: multi_v7_defconfig
Patch is against 4.18-rc3 (localversion-next is next-20180706)
arch/arm/mach-imx/cpu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
index 32969f3..c6b1bf9 100644
--- a/arch/arm/mach-imx/cpu.c
+++ b/arch/arm/mach-imx/cpu.c
@@ -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);
}
}
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: imx: flag failure of of_iomap
2018-07-08 8:32 [PATCH] ARM: imx: flag failure of of_iomap Nicholas Mc Guire
@ 2018-07-11 12:47 ` Shawn Guo
0 siblings, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2018-07-11 12:47 UTC (permalink / raw)
To: Nicholas Mc Guire
Cc: Steffen Trumtrar, Sascha Hauer, Russell King, linux-kernel,
NXP Linux Team, Pengutronix Kernel Team, Fabio Estevam,
linux-arm-kernel
On Sun, Jul 08, 2018 at 10:32:54AM +0200, Nicholas Mc Guire wrote:
> 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")
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: imx: flag failure of of_iomap
2019-04-13 7:14 [PATCH 0/4] ARM: imx legacy: cleanups Nicholas Mc Guire
@ 2019-04-13 7:14 ` Nicholas Mc Guire
0 siblings, 0 replies; 3+ messages in thread
From: Nicholas Mc Guire @ 2019-04-13 7:14 UTC (permalink / raw)
To: Russell King
Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team, Mark Brown, Linus Walleij, Tony Lindgren,
Mike Rapoport, Janusz Krzysztofik, linux-arm-kernel,
linux-kernel, Nicholas Mc Guire
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")
---
Problem found by experimental coccinelle script
Patch was compiletested with: multi_v7_defconfig
Patch is against 4.18-rc3 (localversion-next is next-20180706)
arch/arm/mach-imx/cpu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
index 32969f3..c6b1bf9 100644
--- a/arch/arm/mach-imx/cpu.c
+++ b/arch/arm/mach-imx/cpu.c
@@ -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);
}
}
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-13 7:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-08 8:32 [PATCH] ARM: imx: flag failure of of_iomap Nicholas Mc Guire
2018-07-11 12:47 ` Shawn Guo
2019-04-13 7:14 [PATCH 0/4] ARM: imx legacy: cleanups Nicholas Mc Guire
2019-04-13 7:14 ` [PATCH] ARM: imx: flag failure of of_iomap Nicholas Mc Guire
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).