mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-07 21:33:54 +00:00
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
This commit is contained in:
parent
bac623d186
commit
bdbbf48f4d
1 changed files with 1 additions and 5 deletions
|
@ -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 @@ int stpmic2_regulator_levels_mv(struct pmic_handle_s *pmic,
|
|||
{
|
||||
const struct regul_struct *regul = ®ul_table[id];
|
||||
|
||||
if (regul == NULL) {
|
||||
return RET_ERROR_BAD_PARAMETERS;
|
||||
}
|
||||
|
||||
if (levels_count != NULL) {
|
||||
*levels_count = regul->volt_table_size;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue