[HAL][DMA] Manage the case of an invalid callback ID passed to the HAL_DMA_RegisterCallback() function
diff --git a/Src/stm32f2xx_hal_dma.c b/Src/stm32f2xx_hal_dma.c
index 86723ec..6f086e3 100644
--- a/Src/stm32f2xx_hal_dma.c
+++ b/Src/stm32f2xx_hal_dma.c
@@ -1005,6 +1005,8 @@
       break;
 
     default:
+      /* Return error status */
+      status =  HAL_ERROR;
       break;
     }
   }