[HAL][TIM] In HAL_TIMEx_RemapConfig __HAL_LOCK is called before calls to assert_param
diff --git a/Src/stm32l0xx_hal_tim_ex.c b/Src/stm32l0xx_hal_tim_ex.c
index 5713218..a4c701a 100644
--- a/Src/stm32l0xx_hal_tim_ex.c
+++ b/Src/stm32l0xx_hal_tim_ex.c
@@ -393,10 +393,11 @@
   */
 HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap)
 {
-  __HAL_LOCK(htim);
 
   /* Check parameters */
   assert_param(IS_TIM_REMAP(htim->Instance, Remap));
+  
+  __HAL_LOCK(htim);
 
   /* Set the Timer remapping configuration */
   WRITE_REG(htim->Instance->OR, Remap);