]> git.dujemihanovic.xyz Git - u-boot.git/commit
tools: kwbimage: Check the return value of image_headersz_v1()
authorPali Rohár <pali@kernel.org>
Wed, 12 Jan 2022 17:20:42 +0000 (18:20 +0100)
committerStefan Roese <sr@denx.de>
Fri, 14 Jan 2022 10:39:16 +0000 (11:39 +0100)
commit252e7c3a24fefdf88dfa3fff87e8dc4d0c7aa9cc
treece3460bd3dc00f7457d273869b5a54c06c3ed302
parent0aca27ea185188a50292dd5bcec07fef020d10e6
tools: kwbimage: Check the return value of image_headersz_v1()

Function image_headersz_v1() may return zero on fatal errors.
In this case the function already printed an error message.

Check the return value of image_headersz_v1() in kwbimage_generate(),
and exit on zero value with EXIT_FAILURE.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
tools/kwbimage.c