diff options
author | Heinrich Schuchardt | 2024-01-07 09:43:40 +0100 |
---|---|---|
committer | Tom Rini | 2024-01-18 17:50:27 -0500 |
commit | 3f9312236a427db3bc11770ced4ed3c2b67d3c45 (patch) | |
tree | 23e3828db12565f88db6cb020e95a5801e7c0d84 /boot/bootflow.c | |
parent | f055d6e8f0d63a80d72ab5b092a26bedc652ac3b (diff) |
boot: remove dead code in bootflow_check()
The 'return 0;' statement is not reachable. Remove it.
'else' is superfluous after an if statement with return.
Addresses-Coverity-ID: 352451 ("Logically dead code")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'boot/bootflow.c')
-rw-r--r-- | boot/bootflow.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/boot/bootflow.c b/boot/bootflow.c index 1ea2966ae9a..05484fd5b1b 100644 --- a/boot/bootflow.c +++ b/boot/bootflow.c @@ -361,7 +361,7 @@ static int bootflow_check(struct bootflow_iter *iter, struct bootflow *bflow) } /* Unless there is nothing more to try, move to the next device */ - else if (ret != BF_NO_MORE_PARTS && ret != -ENOSYS) { + if (ret != BF_NO_MORE_PARTS && ret != -ENOSYS) { log_debug("Bootdev '%s' part %d method '%s': Error %d\n", dev->name, iter->part, iter->method->name, ret); /* @@ -371,10 +371,8 @@ static int bootflow_check(struct bootflow_iter *iter, struct bootflow *bflow) if (iter->flags & BOOTFLOWIF_ALL) return log_msg_ret("all", ret); } - if (ret) - return log_msg_ret("check", ret); - return 0; + return log_msg_ret("check", ret); } int bootflow_scan_first(struct udevice *dev, const char *label, |