Commit e9d1e5af authored by Yann Gautier's avatar Yann Gautier
Browse files

plat/st: correctly check pwr-regulators node



This warning was issued by cppcheck in our downstream code:
[plat/st/common/stm32mp_dt.c:629] -> [plat/st/common/stm32mp_dt.c:634]:
 (warning) Identical condition 'node<0', second condition is always false

The second test has to check variable pwr_regulators_node.

Change-Id: I4a20c4a3ac0ef0639c2df36309d90a61c02b511f
Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
parent 9fe181c6
......@@ -469,7 +469,7 @@ uint32_t dt_get_pwr_vdd_voltage(void)
}
pwr_regulators_node = fdt_subnode_offset(fdt, node, "pwr-regulators");
if (node < 0) {
if (pwr_regulators_node < 0) {
INFO("%s: Cannot read pwr-regulators node in DT\n", __func__);
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment