Commit 7540bd33 authored by Rob Herring (Arm)'s avatar Rob Herring (Arm) Committed by Mark Brown

regulator: qcom_spmi: Drop unnecessary of_find_property() call

There's no need to check for presence of "qcom,saw-reg" before parsing
it. If the property doesn't exist, parsing it will return NULL.
Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240828130056.3481050-1-robh@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent bff5ca83
......@@ -2528,8 +2528,8 @@ static int qcom_spmi_regulator_probe(struct platform_device *pdev)
if (!reg)
return -ENODEV;
if (of_find_property(node, "qcom,saw-reg", &lenp)) {
syscon = of_parse_phandle(node, "qcom,saw-reg", 0);
syscon = of_parse_phandle(node, "qcom,saw-reg", 0);
if (syscon) {
saw_regmap = syscon_node_to_regmap(syscon);
of_node_put(syscon);
if (IS_ERR(saw_regmap))
......
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