diff options
author | Rob Herring (Arm) <robh@kernel.org> | 2024-08-28 15:00:54 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-08-28 22:52:44 +0200 |
commit | 7540bd3398675e54cbd7324c47be8cd3c7a6d9c5 (patch) | |
tree | db39ac453b9fe81c347f81c22009e43df0a44d78 /drivers/regulator | |
parent | regulator: Minor cleanups (diff) | |
download | linux-7540bd3398675e54cbd7324c47be8cd3c7a6d9c5.tar.xz linux-7540bd3398675e54cbd7324c47be8cd3c7a6d9c5.zip |
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>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/qcom_spmi-regulator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 9a9fa20dcd95..68603649db48 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -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)) |