diff --git a/bsp/Infineon/libraries/IFX_PSOC6_HAL/mtb-hal-cat1/source/cyhal_crc.c b/bsp/Infineon/libraries/IFX_PSOC6_HAL/mtb-hal-cat1/source/cyhal_crc.c index e50ffc65a4..acc96a942a 100644 --- a/bsp/Infineon/libraries/IFX_PSOC6_HAL/mtb-hal-cat1/source/cyhal_crc.c +++ b/bsp/Infineon/libraries/IFX_PSOC6_HAL/mtb-hal-cat1/source/cyhal_crc.c @@ -52,7 +52,7 @@ cy_rslt_t cyhal_crc_init(cyhal_crc_t *obj) void cyhal_crc_free(cyhal_crc_t *obj) { - CY_ASSERT(NULL != obj&&obj->resource.type != CYHAL_RSC_CRYPTO); + CY_ASSERT(NULL != obj && obj->resource.type != CYHAL_RSC_CRYPTO); _cyhal_crc_calc_free(obj->base); if (obj->resource.type != CYHAL_RSC_INVALID) { diff --git a/components/drivers/fdt/src/dtb_get.c b/components/drivers/fdt/src/dtb_get.c index df1b5f9341..4922b98d6c 100644 --- a/components/drivers/fdt/src/dtb_get.c +++ b/components/drivers/fdt/src/dtb_get.c @@ -724,6 +724,7 @@ struct dtb_memreserve *dtb_node_get_dtb_memreserve(struct dtb_node *dtb_node, in } dtb_node_root = dtb_node_root->parent; } + if(dtb_node_root == NULL) return NULL; *memreserve_size = dtb_node_root->header->memreserve_sz;