mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 03:15:00 +00:00
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>
This commit is contained in:
parent
f055d6e8f0
commit
3f9312236a
1 changed files with 2 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue