[PATCH 2/3] soc: brcmstb: Do not fail initcalls on non-STB platforms

Thierry Reding thierry.reding at gmail.com
Fri Jan 12 05:38:12 PST 2018


From: Thierry Reding <treding at nvidia.com>

If the early initcalls are run on non-STB platforms, abort early with a
return value of 0. This avoids getting this expected behaviour flagged
as a failure.

Signed-off-by: Thierry Reding <treding at nvidia.com>
---
 drivers/soc/bcm/brcmstb/common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/soc/bcm/brcmstb/common.c b/drivers/soc/bcm/brcmstb/common.c
index 816a0f55a9ea..32478628bcb3 100644
--- a/drivers/soc/bcm/brcmstb/common.c
+++ b/drivers/soc/bcm/brcmstb/common.c
@@ -74,7 +74,7 @@ static int __init brcmstb_soc_device_early_init(void)
 
 	sun_top_ctrl = of_find_matching_node(NULL, sun_top_ctrl_match);
 	if (!sun_top_ctrl)
-		return -ENODEV;
+		return 0;
 
 	sun_top_ctrl_base = of_iomap(sun_top_ctrl, 0);
 	if (!sun_top_ctrl_base) {
@@ -100,7 +100,7 @@ static int __init brcmstb_soc_device_init(void)
 
 	sun_top_ctrl = of_find_matching_node(NULL, sun_top_ctrl_match);
 	if (!sun_top_ctrl)
-		return -ENODEV;
+		return 0;
 
 	of_node_put(sun_top_ctrl);
 
-- 
2.15.1




More information about the linux-arm-kernel mailing list