[Concept,11/19] bootctl: Clean up some unwanted debugging in the logic

Message ID 20251208023229.3929910-12-sjg@u-boot.org
State New
Headers
Series bootctl: Continue development with TKey functionality |

Commit Message

Simon Glass Dec. 8, 2025, 2:32 a.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Tidy up the code style for checking the result of read_images() and drop
some commented-out debug lines.

Also fix a shadowed variable while we are here.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 boot/bootctl/logic.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
  

Patch

diff --git a/boot/bootctl/logic.c b/boot/bootctl/logic.c
index d3ee7b2fa6c..be00c965b66 100644
--- a/boot/bootctl/logic.c
+++ b/boot/bootctl/logic.c
@@ -74,8 +74,6 @@  static int logic_start(struct udevice *dev)
 	int ret;
 
 	if (priv->opt_persist_state) {
-		int ret;
-
 		/* read in our state */
 		ret = bc_state_load(priv->state);
 		if (ret)
@@ -263,17 +261,12 @@  static int logic_poll(struct udevice *dev)
 		 * this
 		 */
 		ret = read_images(dev, os);
-		if (ret && ret != -ENOSYS) {
-			if (ret)
-				return log_msg_ret("lri", ret);
-		}
+		if (ret && ret != -ENOSYS)
+			return log_msg_ret("lri", ret);
 		ret = prepare_for_boot(dev, os);
 		if (ret)
 			return log_msg_ret("lpb", ret);
 
-		/* debugging */
-		// return -ESHUTDOWN;
-
 		/* boot OS */
 		ret = bootflow_boot(&os->bflow);
 		if (ret)