]> git.baikalelectronics.ru Git - uboot.git/commit
bootstd: Adjust code ordering to work around compiler quirk
authorSimon Glass <sjg@chromium.org>
Mon, 24 Apr 2023 01:49:49 +0000 (13:49 +1200)
committerTom Rini <trini@konsulko.com>
Wed, 26 Apr 2023 12:43:05 +0000 (08:43 -0400)
commite10b8398adeebe1f8f5b62db19eab37a1205f2a7
tree503cf2b631550c04b713f0604e6d854187325d53
parent6ccee2bec7aa1f488a291b67bd082e9f2c23f0f7
bootstd: Adjust code ordering to work around compiler quirk

At present when debugging is off, bootdev_find_in_blk() sometimes fails
to find a valid bootflow, e.g. with virtio. Accessing the 'blk' variable
later in the function seems to correct it.

Move the 'ret' check before the debug statement and set the block device
again aftewards, to work around this.

Signed-off-by: Simon Glass <sjg@chromium.org>
boot/bootdev-uclass.c