Hello, On which platform did you observed this behavior, the release version you used ?
Did you run as baremetal or FreeRTOS, OSIF has different behavior ?
In case of bare metal :
The semaphores space should already be allocated before you call FLEXCAN_DRV_Init in the flexcan_state_t structure that is passed to the init function.
In the driver init function the semaphore is only enabled(initialized) by OSIF_SemaCreate((semaphore_t *const)&state->mbs[i].mbSema, 0U);