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(-) 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) -- 2.43.0