Fix for boot_read_swap_state_by_id to close flash area on errors
@@ -286,14 +286,10 @@ boot_read_swap_state_by_id(int flash_area_id, struct boot_swap_state *state)
}
rc = boot_read_swap_state(fap, state);
- if (rc) {
flash_area_close(fap);
return rc;
}
- return 0;
-}
-
int
boot_write_magic(const struct flash_area *fap)
{
