* [PATCH] AT91: bootsource: Remove zero check of at91_bootsource
@ 2025-04-29 14:44 Alexander Shiyan
0 siblings, 0 replies; only message in thread
From: Alexander Shiyan @ 2025-04-29 14:44 UTC (permalink / raw)
To: barebox; +Cc: Alexander Shiyan
The patch removes the redundant zero check for at91_bootsource
before calling bootsource_set_raw(), as at91_bootsource == 0
is a valid scenario.
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
arch/arm/mach-at91/sama5_bootsource.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-at91/sama5_bootsource.c b/arch/arm/mach-at91/sama5_bootsource.c
index 0d91f5fb5a..db96332bc5 100644
--- a/arch/arm/mach-at91/sama5_bootsource.c
+++ b/arch/arm/mach-at91/sama5_bootsource.c
@@ -28,9 +28,8 @@ static int sama5_bootsource_init(void)
else
return 0;
- if (at91_bootsource)
- bootsource_set_raw(sama5_bootsource(at91_bootsource),
- sama5_bootsource_instance(at91_bootsource));
+ bootsource_set_raw(sama5_bootsource(at91_bootsource),
+ sama5_bootsource_instance(at91_bootsource));
return 0;
}
--
2.38.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-29 16:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-29 14:44 [PATCH] AT91: bootsource: Remove zero check of at91_bootsource Alexander Shiyan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox