Skip to contentSkip to conversation

AT91: bootsource: Remove zero check of at91_bootsource

PATCH Applied Alexander Shiyan 2 participants 2 messages Apr 29, 2025 – Apr 30, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 AT91: bootsource: Remove zero check of at91_bootsource

The patch removes the redundant zero check for at91_bootsource before calling bootsource_set_raw(), as at91_bootsource == 0 is a valid scenario.

---
 arch/arm/mach-at91/sama5_bootsource.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
arch/arm/mach-at91/sama5_bootsource.c +2 -3
index 0d91f5fb5a..db96332bc5 100644
@@ -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;
 }
Signature · 1 line
2.38.2