[PATCH 7/7] ARM: stm32mp: init: ignore of_register_fixup return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux