From bd8ce943658e94bb16d23c11a92c863c8421881a Mon Sep 17 00:00:00 2001 From: Dominik Ermel Date: Fri, 12 Jul 2024 19:44:46 +0000 Subject: [PATCH] boot: Remove pointless slot identification In the boot_image_validate_encrypted there was call to flash_area_id_to_multi_image_slot, which tries to figure out slot index from flash area and image index, and the result of the call was not used for anything as slot index is hardcoded in the next call to be 1 (secondary). Signed-off-by: Dominik Ermel --- boot/boot_serial/src/boot_serial_encryption.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/boot/boot_serial/src/boot_serial_encryption.c b/boot/boot_serial/src/boot_serial_encryption.c index 6201e6b69..ee2e111cb 100644 --- a/boot/boot_serial/src/boot_serial_encryption.c +++ b/boot/boot_serial/src/boot_serial_encryption.c @@ -40,10 +40,6 @@ boot_image_validate_encrypted(const struct flash_area *fa_p, if (rc < 0) { FIH_RET(fih_rc); } - rc = flash_area_id_to_multi_image_slot(image_index, flash_area_get_id(fa_p)); - if (rc < 0) { - FIH_RET(fih_rc); - } rc = boot_enc_set_key(BOOT_CURR_ENC(state), 1, bs); if (rc < 0) { FIH_RET(fih_rc);