X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fflash%2Fflash.c;h=46606d2de28fe57f871d6a58be9006bb52616b30;hb=a4ed84817116c473f398889ed3b54851a1e25a08;hp=850dcd4cb50b1f5579a044ecf7fd28c9c6b2d616;hpb=35b3c95299a97c05078f7dd662d66c89a356869d;p=fw%2Fopenocd diff --git a/src/flash/flash.c b/src/flash/flash.c index 850dcd4cb..46606d2de 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -884,7 +884,10 @@ int flash_erase_address_range(target_t *target, u32 addr, u32 length) return ERROR_FLASH_DST_OUT_OF_BANK; /* no corresponding bank found */ if (c->size == 0 || c->num_sectors == 0) + { + LOG_ERROR("Bank is invalid"); return ERROR_FLASH_BANK_INVALID; + } if (length == 0) {