diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f0.c b/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f0.c index 0a73e968e2..b8d42c8492 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f0.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f0.c @@ -167,7 +167,7 @@ __exit: } LOG_D("erase done: addr (0x%p), size %d", (void *)addr, size); - return result; + return size; } #if defined(PKG_USING_FAL) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f1.c b/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f1.c index 37022dd1ca..8f7d45ade7 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f1.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f1.c @@ -167,7 +167,7 @@ __exit: } LOG_D("erase done: addr (0x%p), size %d", (void *)addr, size); - return result; + return size; } #if defined(PKG_USING_FAL) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f4.c b/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f4.c index 0bafd5b779..f36d5cdc69 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f4.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f4.c @@ -310,7 +310,7 @@ __exit: } LOG_D("erase done: addr (0x%p), size %d", (void*)addr, size); - return result; + return size; } #if defined(PKG_USING_FAL) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f7.c b/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f7.c index 58f3d2029b..3ecb0be5e9 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f7.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f7.c @@ -382,7 +382,7 @@ __exit: } LOG_D("erase done: addr (0x%p), size %d", (void *)addr, size); - return result; + return size; } #if defined(PKG_USING_FAL)