[PATCH] AT91: bootsource: Remove zero check of at91_bootsource

Alexander Shiyan eagle.alexander923 at gmail.com
Tue Apr 29 07:44:22 PDT 2025


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




More information about the barebox mailing list