Call device binding for DT_FLASH_DEV_NAME only if it is defined

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
This commit is contained in:
Rajavardhan Gundi 2018-12-06 17:24:10 +05:30 committed by Fabio Utzig
parent 1b8d7fb355
commit c3353b240e
1 changed files with 2 additions and 0 deletions

View File

@ -108,11 +108,13 @@ void main(void)
os_heap_init();
#ifdef DT_FLASH_DEV_NAME
if (!flash_device_get_binding(DT_FLASH_DEV_NAME)) {
BOOT_LOG_ERR("Flash device %s not found", DT_FLASH_DEV_NAME);
while (1)
;
}
#endif
#ifdef CONFIG_MCUBOOT_SERIAL