[PATCH 7/7] ARM: stm32mp: init: ignore of_register_fixup return value
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Nov 22 10:11:16 PST 2023
of_register_fixup can't actually fail, so drop the return value check
and propagation to make the code a bit more concise.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
arch/arm/mach-stm32mp/init.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-stm32mp/init.c b/arch/arm/mach-stm32mp/init.c
index 2b0a665220ce..2eb8b6beec2a 100644
--- a/arch/arm/mach-stm32mp/init.c
+++ b/arch/arm/mach-stm32mp/init.c
@@ -158,7 +158,6 @@ static int stm32mp15_setup_cpu_type(void)
{
unsigned long cpufixupctx = 0, pkgfixupctx = 0;
int cputype, package;
- int ret;
__stm32mp15_get_cpu_type(&cputype);
switch (cputype) {
@@ -222,14 +221,10 @@ static int stm32mp15_setup_cpu_type(void)
pr_debug("cputype = 0x%x, package = 0x%x\n", cputype, package);
- if (cpufixupctx) {
- ret = of_register_fixup(stm32mp15_fixup_cpus, (void*)cpufixupctx);
- if (ret)
- return ret;
- }
-
+ if (cpufixupctx)
+ of_register_fixup(stm32mp15_fixup_cpus, (void*)cpufixupctx);
if (pkgfixupctx)
- return of_register_fixup(stm32mp15_fixup_pkg, (void*)pkgfixupctx);
+ of_register_fixup(stm32mp15_fixup_pkg, (void*)pkgfixupctx);
return 0;
}
--
2.39.2
More information about the barebox
mailing list