regulator: of: Remove redundant check in of_get_regulation_constraints
PATCH 1/1 regulator: of: Remove redundant check in of_get_regulation_constraints
The pointer 'suspend_state' cannot be NULL after the switch statement so remove the redundant check.
Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool.
Signed-off-by Karina Yankevich <[email protected]>
--- drivers/regulator/of_regulator.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/regulator/of_regulator.c +0 -4
@@ -266,10 +266,6 @@ static int of_get_regulation_constraints(struct device *dev, suspend_np =of_get_child_by_name (np, regulator_states[i]);if (!suspend_np)continue ; -if (!suspend_state) { -of_node_put (suspend_np); -continue ; - }if (!of_property_read_u32 (suspend_np,"regulator-mode" , &pval)) {
Signature · 1 line
2.25.1
Mark Brown
maintainerQuoted 5 lines · Karina Yankevich
The pointer '
suspend_state' cannot be NULL after the switch statement so remove the redundant check.Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool.
You've provided no analysis which shows that this is the case, nor any explanation as to why it matters.