fix(st-pmic): remove deadcode from STPMIC2 driver

"regul" corresponds to a specific part of a global table that can't be
undefined. Thus, checking if it is NULL is useless.

Issue found by Coverity (CID 445089).

Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
Change-Id: Ic812bc1fde12fe8389677c7c72fb85246c50f5c9
diff --git a/drivers/st/pmic/stpmic2.c b/drivers/st/pmic/stpmic2.c
index 05a80ec..7f233db 100644
--- a/drivers/st/pmic/stpmic2.c
+++ b/drivers/st/pmic/stpmic2.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024, STMicroelectronics - All Rights Reserved
+ * Copyright (C) 2024-2025, STMicroelectronics - All Rights Reserved
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -247,10 +247,6 @@
 {
 	const struct regul_struct *regul = &regul_table[id];
 
-	if (regul == NULL) {
-		return RET_ERROR_BAD_PARAMETERS;
-	}
-
 	if (levels_count != NULL) {
 		*levels_count = regul->volt_table_size;
 	}