1

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: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240828130056.3481050-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Rob Herring (Arm) 2024-08-28 08:00:54 -05:00 committed by Mark Brown
parent bff5ca8379
commit 7540bd3398
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -2528,8 +2528,8 @@ static int qcom_spmi_regulator_probe(struct platform_device *pdev)
if (!reg) if (!reg)
return -ENODEV; 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); saw_regmap = syscon_node_to_regmap(syscon);
of_node_put(syscon); of_node_put(syscon);
if (IS_ERR(saw_regmap)) if (IS_ERR(saw_regmap))