X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fstm32l4x.c;fp=src%2Fflash%2Fnor%2Fstm32l4x.c;h=6a1fa074e33da7fadc4214205314a4825825dcc3;hp=fa0c48b4f5992b92567ddc9c1a9fb60f8414e598;hb=e3a5f1613bcceb4508917a7f79348167503effab;hpb=f02327d85953152743dbb02d9ceeaa5b59da9ebe;ds=sidebyside diff --git a/src/flash/nor/stm32l4x.c b/src/flash/nor/stm32l4x.c index fa0c48b4f5..6a1fa074e3 100644 --- a/src/flash/nor/stm32l4x.c +++ b/src/flash/nor/stm32l4x.c @@ -652,6 +652,9 @@ static int stm32l4_probe(struct flash_bank *bank) /* get options to for DUAL BANK. */ retval = target_read_u32(target, STM32_FLASH_OPTR, &options); + if (retval != ERROR_OK) + return retval; + /* only devices with < 1024 kiB may be set to single bank dual banks */ if ((flash_size_in_kb == 1024) || !(options & OPT_DUALBANK)) stm32l4_info->option_bytes.bank_b_start = 256;