diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-11-08 08:52:03 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-11-08 09:15:23 +0100 |
commit | 170c9d4123c2263fbe9439dc073c7b343474beeb (patch) | |
tree | 71a0a89e06b57abd01ae0988b9c507466423d488 /arch | |
parent | 6c8c249deaa01f8c1c2b3381242f5e52273d25c6 (diff) | |
download | barebox-170c9d4123c2263fbe9439dc073c7b343474beeb.tar.gz barebox-170c9d4123c2263fbe9439dc073c7b343474beeb.tar.xz |
ARM: Rockchip: init: propagate error in init function
The SoC init functions return an error code when run on a SoC without
support compiled in. Propagate error codes, so this is reported to the
user.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211108075209.2366770-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-rockchip/rockchip.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c index f0b2484c68..c185b0cc2b 100644 --- a/arch/arm/mach-rockchip/rockchip.c +++ b/arch/arm/mach-rockchip/rockchip.c @@ -6,14 +6,13 @@ static int rockchip_init(void) { if (of_machine_is_compatible("rockchip,rk3188")) - rk3188_init(); - else if (of_machine_is_compatible("rockchip,rk3288")) - rk3288_init(); - else if (of_machine_is_compatible("rockchip,rk3568")) - rk3568_init(); - else - pr_err("Unknown rockchip SoC\n"); + return rk3188_init(); + if (of_machine_is_compatible("rockchip,rk3288")) + return rk3288_init(); + if (of_machine_is_compatible("rockchip,rk3568")) + return rk3568_init(); - return 0; + pr_err("Unknown rockchip SoC\n"); + return -ENODEV; } postcore_initcall(rockchip_init); |