Home
last modified time | relevance | path

Searched hist:"854 b4dd92ce0546bb97562c613679d27844bdb60" (Results 1 – 1 of 1) sorted by relevance

/rk3399_ARM-atf/common/
H A Dbl_common.c854b4dd92ce0546bb97562c613679d27844bdb60 Mon Jul 26 10:33:46 UTC 2021 Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com> fix(common): error out if image load size is zero

Change the return value of function to error value when image size
check correctly passes (io_result == 0), but the image size is zero
(image_size == 0). If such an edge case occurs, the function would
not load any data, but would return successful return code 0.

This edge case is already detected by the current conditional and a
warning is reported, but in this special case, return value 0 was
returned to the caller, which might have confused the caller into
thinking that a valid loading of data occurred, even if it did not.

Handle the edge case, and return error, to assure the caller can not
be confused.

Signed-off-by: Hideyuki Nitta <hideyuki.nitta.jf@hitachi.com>
Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Signed-off-by: Dien Pham <dien.pham.ry@renesas.com>
Signed-off-by: Hieu Nguyen <hieu.nguyen.dn@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Change-Id: Id7e4b675540971b28f451e4590064b3fb1840fd6