ssbl_handler: fix age comparison
diff mbox series

Message ID 20191016080725.1825-1-sbabic@denx.de
State Accepted
Headers show
Series
  • ssbl_handler: fix age comparison
Related show

Commit Message

Stefano Babic Oct. 16, 2019, 8:07 a.m. UTC
Age is defined module 3 and not module 4.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 handlers/ssbl_handler.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch
diff mbox series

diff --git a/handlers/ssbl_handler.c b/handlers/ssbl_handler.c
index 659c90d..7605fd3 100644
--- a/handlers/ssbl_handler.c
+++ b/handlers/ssbl_handler.c
@@ -153,10 +153,10 @@  static int get_inactive_ssbl(struct ssbl_priv *padmins)
 		padmins[0].device, age0,
 		padmins[1].device, age1);
 
-	if (!age0 && age1 == 3)
-		age0 = 4;
-	if (!age1 && age0 == 3)
-		age1 = 4;
+	if (!age0 && age1 == 2)
+		age0 = 3;
+	if (!age1 && age0 == 2)
+		age1 = 3;
 
 	if (age1 > age0)
 		return 0;