]> git.ipfire.org Git - thirdparty/u-boot.git/commit
common: update: Fix TFTP return value handling
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Mon, 20 Apr 2026 01:23:07 +0000 (03:23 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 24 Apr 2026 17:28:14 +0000 (11:28 -0600)
commitd64c4a69585aa096c693c0b7ec4e6e04333fc45f
tree897762af88d3c33808e0658484ba12b9c4d7739e
parent30885b01aaa4bcdfa3fee9ca3066d3af563e6688
common: update: Fix TFTP return value handling

The net_loop() returns 1 on success, but update_load() returns 0 on
success. Do not assign rv which is the return value of update_load()
to net_loop(), instead assign net_loop() return value to a temporary
variable and then update rv only if the temporary variable is negative.
This way the update_load() now correctly returns 0 on tftp success and
1 only on failure.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
common/update.c