mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
fix(drivers/st/pmic): missing error check
In pmic_operate(), "regulators" node value must be checked before entering in the fdt_for_each_subnode loop. Change-Id: I1460cd24ec56ec47ab644f396b71b92973e75fb4 Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com> Signed-off-by: Yann Gautier <yann.gautier@st.com>
This commit is contained in:
parent
42822844bf
commit
a4bcfe94e7
1 changed files with 3 additions and 0 deletions
|
@ -121,6 +121,9 @@ int dt_pmic_configure_boot_on_regulators(void)
|
|||
}
|
||||
|
||||
regulators_node = fdt_subnode_offset(fdt, pmic_node, "regulators");
|
||||
if (regulators_node < 0) {
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
fdt_for_each_subnode(regulator_node, fdt, regulators_node) {
|
||||
const fdt32_t *cuint;
|
||||
|
|
Loading…
Add table
Reference in a new issue