summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduard Strehlau <eduard@lionizers.com>2023-09-07 04:47:25 +0300
committerStefano Babic <sbabic@denx.de>2023-09-23 19:45:33 +0300
commit2ec9ebc72a432f9b7b6631cb9666245f776cc256 (patch)
tree7fa48689ebc79046b0fb6d6d2c779facf33dc961
parent71dfe179cd3840f56bc812131b4031b0976efbc1 (diff)
downloadu-boot-2ec9ebc72a432f9b7b6631cb9666245f776cc256.tar.xz
imx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset
Since commit ea91031b2232 ("imx: hab: extend hab_auth_img to calculate ivt_offset"), it is possible to call the hab_auth_img command without the last ivt_offset argument. Currently, calling hab_auth_img_or_fail without the last ivt_offset parameter causes a failure and the command usage text is shown. Fix this problem by adjusting the argc logic to allow calling hab_auth_img_or_fail with only the address and size parameters. This way, both hab_auth_img and hab_auth_img_or_fail have the same behavior with respect to the allowed number of command parameters. Signed-off-by: Eduard Strehlau <eduard@lionizers.com> Signed-off-by: Fabio Estevam <festevam@denx.de>
-rw-r--r--arch/arm/mach-imx/hab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c
index b3ef36c797..8ba3c5ff8e 100644
--- a/arch/arm/mach-imx/hab.c
+++ b/arch/arm/mach-imx/hab.c
@@ -662,7 +662,7 @@ static int do_authenticate_image_or_failover(struct cmd_tbl *cmdtp, int flag,
{
int ret = CMD_RET_FAILURE;
- if (argc != 4) {
+ if (argc < 3) {
ret = CMD_RET_USAGE;
goto error;
}