diff options
| author | Rob Herring (Arm) <robh@kernel.org> | 2024-07-31 13:12:42 -0600 |
|---|---|---|
| committer | Stephen Boyd <sboyd@kernel.org> | 2024-08-02 16:53:38 -0700 |
| commit | 66b065239a2db3ac188d369d0b1797cd8bf62aeb (patch) | |
| tree | 58bb65860132e21ad0299568ccbb5b083c39c6dc /drivers/clk/versatile | |
| parent | 9d6a53042c49af34603ff32689305a10a5efbb4e (diff) | |
| download | linux-66b065239a2db3ac188d369d0b1797cd8bf62aeb.tar.gz linux-66b065239a2db3ac188d369d0b1797cd8bf62aeb.tar.bz2 linux-66b065239a2db3ac188d369d0b1797cd8bf62aeb.zip | |
clk: Use of_property_present()
Use of_property_present() to test for property presence rather than
of_(find|get)_property(). This is part of a larger effort to remove
callers of of_find_property() and similar functions.
of_(find|get)_property() leak the DT struct property and data pointers
which is a problem for dynamically allocated nodes which may be freed.
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240731191312.1710417-4-robh@kernel.org
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> # clk-mstp.c
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/versatile')
| -rw-r--r-- | drivers/clk/versatile/clk-sp810.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/versatile/clk-sp810.c b/drivers/clk/versatile/clk-sp810.c index 45adac1b4630..033d4f78edc8 100644 --- a/drivers/clk/versatile/clk-sp810.c +++ b/drivers/clk/versatile/clk-sp810.c @@ -110,7 +110,7 @@ static void __init clk_sp810_of_setup(struct device_node *node) init.parent_names = parent_names; init.num_parents = num; - deprecated = !of_find_property(node, "assigned-clock-parents", NULL); + deprecated = !of_property_present(node, "assigned-clock-parents"); for (i = 0; i < ARRAY_SIZE(sp810->timerclken); i++) { snprintf(name, sizeof(name), "sp810_%d_%d", instance, i); |
