Message ID | 20240828130056.3481050-1-robh@kernel.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | [1/2] regulator: qcom_spmi: Drop unnecessary of_find_property() call | expand |
On Wed, Aug 28, 2024 at 08:00:54AM GMT, Rob Herring (Arm) wrote: > 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> > --- > drivers/regulator/qcom_spmi-regulator.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
On Wed, 28 Aug 2024 08:00:54 -0500, Rob Herring (Arm) wrote: > 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. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next Thanks! [1/2] regulator: qcom_spmi: Drop unnecessary of_find_property() call commit: 7540bd3398675e54cbd7324c47be8cd3c7a6d9c5 [2/2] regulator: qcom_spmi: Use of_property_read_bool() commit: dd72a3b8a6007b44ed3b85e1d606afc434879e70 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
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))
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> --- drivers/regulator/qcom_spmi-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)