X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Ftarget%2Friscv%2Friscv-013.c;h=7af460241b20cf8a8f4ab714397c22598bf8edad;hb=f735faa9319af324b94e4257444419c8dfec6592;hp=006266a90c5e93190d2859013f9ed11c621e4074;hpb=35f284fe7c51d29768156cfec172152d2539d98a;p=fw%2Fopenocd diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 006266a90..7af460241 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -1199,10 +1199,7 @@ static int scratch_reserve(struct target *target, static int scratch_release(struct target *target, scratch_mem_t *scratch) { - if (scratch->area) - return target_free_working_area(target, scratch->area); - - return ERROR_OK; + return target_free_working_area(target, scratch->area); } static int scratch_read64(struct target *target, scratch_mem_t *scratch,