From 270705e2d0c209c07d32c8de20c8611b255b1cab Mon Sep 17 00:00:00 2001 From: Dominik Ermel Date: Mon, 8 Mar 2021 16:58:30 +0000 Subject: [PATCH] tests/subsys/dfu/mcuboot: Fix coverity issue on not checked return val The commit fixes coverity issue where return status bank erase operation has not been checked prior to proceeding with tests. Fixes: #32924, Coverity-CID: 219522 Signed-off-by: Dominik Ermel --- tests/subsys/dfu/mcuboot/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/subsys/dfu/mcuboot/src/main.c b/tests/subsys/dfu/mcuboot/src/main.c index 245efd46b7691f..1a8ec81414d38d 100644 --- a/tests/subsys/dfu/mcuboot/src/main.c +++ b/tests/subsys/dfu/mcuboot/src/main.c @@ -77,7 +77,7 @@ void test_request_upgrade(void) zassert(memcmp(expectation, readout, sizeof(expectation)) == 0, "pass", "fail"); - boot_erase_img_bank(FLASH_AREA_ID(image_1)); + zassert(boot_erase_img_bank(FLASH_AREA_ID(image_1)) == 0, "pass", "fail"); zassert(boot_request_upgrade(true) == 0, "pass", "fail");