mgmt: mcumgr: img_mgmt: Fix mismatched slot missing variable

Fixes an issue with a missing variable when
CONFIG_IMG_MGMT_REJECT_DIRECT_XIP_MISMATCHED_SLOT is enabled.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae 2022-12-22 11:10:06 +00:00 committed by Carles Cufí
commit b64ea89ed5

View file

@ -588,6 +588,8 @@ img_mgmt_upload_inspect(const struct img_mgmt_upload_req *req,
#if defined(CONFIG_MCUMGR_GRP_IMG_REJECT_DIRECT_XIP_MISMATCHED_SLOT)
if (hdr->ih_flags & IMAGE_F_ROM_FIXED_ADDR) {
const struct flash_area *fa;
rc = flash_area_open(action->area_id, &fa);
if (rc) {
IMG_MGMT_UPLOAD_ACTION_SET_RC_RSN(action,