mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 7/7] ARM: stm32mp: init: ignore of_register_fixup return value
Date: Wed, 22 Nov 2023 19:11:16 +0100	[thread overview]
Message-ID: <20231122181116.591131-8-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20231122181116.591131-1-a.fatoum@pengutronix.de>

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




  parent reply	other threads:[~2023-11-22 18:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22 18:11 [PATCH 0/7] ARM: stm32mp: random STM32MP13 fixes Ahmad Fatoum
2023-11-22 18:11 ` [PATCH 1/7] ARM: dts: stm32mp: stm32mp135-dk: drop duplicate property Ahmad Fatoum
2023-11-22 18:11 ` [PATCH 2/7] ARM: dts: stm32mp: fix model string for stm32mp135f-dk Ahmad Fatoum
2023-11-22 18:11 ` [PATCH 3/7] ARM: stm32mp: init: drop unused macros Ahmad Fatoum
2023-11-22 18:11 ` [PATCH 4/7] ARM: stm32mp: don't re-enable DBGCFGR clock Ahmad Fatoum
2023-11-22 18:11 ` [PATCH 5/7] ARM: stm32mp: init: handle differences between STM32MP13 and STM32MP15 Ahmad Fatoum
2023-11-22 18:11 ` [PATCH 6/7] ARM: stm32mp: init: don't print STM32MP15 CPU type Ahmad Fatoum
2023-11-22 18:11 ` Ahmad Fatoum [this message]
2023-11-23  7:25 ` [PATCH 0/7] ARM: stm32mp: random STM32MP13 fixes Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231122181116.591131-8-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox