Hello Yafra7,
The functions definitions were correct from your code.
Suggest you set a break point to bmi270_init( ), and do single step debug to see which code return BMI2_E_NULL_PTR.