summaryrefslogtreecommitdiff
path: root/drivers/ddr/microchip
diff options
context:
space:
mode:
authorDaniel Palmer <daniel@0x0f.com>2024-08-31 12:17:06 +0900
committerTom Rini <trini@konsulko.com>2024-09-10 13:15:13 -0600
commitc6eba28c467bea645040789c17d50f04637f4771 (patch)
treeebbbcfd6b7d339fb0d4ed34ef40d658401f7bfe6 /drivers/ddr/microchip
parent2349cc00d907253d88ff2340690d3159d49811f0 (diff)
spl: spl_load: fix comparison between negative error code and unsigned size
read could be a negative error value but size in spl_image is unsigned so when they are compared read is used as if it's a unsigned value and if it's negative it'll most likely be bigger than size and the result will be true and _spl_load() will return 0 to the caller. This results in the caller to _spl_load() not seeing that an error happened as it should and continuing as if the load was completed when it might not have been. Check if read is negative and return it's value if it is before comparing against size in spl_image. Signed-off-by: Daniel Palmer <daniel@0x0f.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/ddr/microchip')
0 files changed, 0 insertions, 0 deletions