[HAL][TIM] Fix HAL_TIMEx_RemapConfig() lock issue: __HAL_LOCK is called before calls to assert_param()
diff --git a/Src/stm32f3xx_hal_tim_ex.c b/Src/stm32f3xx_hal_tim_ex.c
index b254ac5..39080b3 100644
--- a/Src/stm32f3xx_hal_tim_ex.c
+++ b/Src/stm32f3xx_hal_tim_ex.c
@@ -2184,10 +2184,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);