X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Ffespi.c;h=5474ffae4b0750cdc4c6304f2af1bc1db606d8b4;hb=f735faa9319af324b94e4257444419c8dfec6592;hp=11da818547ea3289c64097e6e12eaf025cad2adb;hpb=35f284fe7c51d29768156cfec172152d2539d98a;p=fw%2Fopenocd diff --git a/src/flash/nor/fespi.c b/src/flash/nor/fespi.c index 11da81854..5474ffae4 100644 --- a/src/flash/nor/fespi.c +++ b/src/flash/nor/fespi.c @@ -661,10 +661,8 @@ static int fespi_write(struct flash_bank *bank, const uint8_t *buffer, return ERROR_OK; err: - if (algorithm_wa) { - target_free_working_area(target, data_wa); - target_free_working_area(target, algorithm_wa); - } + target_free_working_area(target, data_wa); + target_free_working_area(target, algorithm_wa); /* Switch to HW mode before return to prompt */ if (fespi_enable_hw_mode(bank) != ERROR_OK)