diff options
author | David Hunter <david.hunter.linux@gmail.com> | 2024-09-18 14:39:23 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2024-10-10 01:01:00 +0200 |
commit | 8fcad5ff78baf7524bb4b46bda4160b5ccc2d2b0 (patch) | |
tree | fb4ceb4ce8558089a04ed8b407bab4bcb8788090 /drivers/clk/clk-qoriq.c | |
parent | clk: Remove unused clk_hw_rate_is_protected (diff) | |
download | linux-8fcad5ff78baf7524bb4b46bda4160b5ccc2d2b0.tar.xz linux-8fcad5ff78baf7524bb4b46bda4160b5ccc2d2b0.zip |
clk: clk-qoriq: Replace of_node_put() with __free()
Use __free() to have automatic cleanup instead of calling of_node_put()
manually.
Compiled without errors or warnings.
Signed-off-by: David Hunter <david.hunter.linux@gmail.com>
Link: https://lore.kernel.org/r/20240918123925.41511-1-david.hunter.linux@gmail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/clk-qoriq.c')
-rw-r--r-- | drivers/clk/clk-qoriq.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c index 4dcde305944c..a560edeb4b55 100644 --- a/drivers/clk/clk-qoriq.c +++ b/drivers/clk/clk-qoriq.c @@ -9,6 +9,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <dt-bindings/clock/fsl,qoriq-clockgen.h> +#include <linux/cleanup.h> #include <linux/clk.h> #include <linux/clk-provider.h> #include <linux/clkdev.h> @@ -1065,11 +1066,8 @@ static void __init _clockgen_init(struct device_node *np, bool legacy); static void __init legacy_init_clockgen(struct device_node *np) { if (!clockgen.node) { - struct device_node *parent_np; - - parent_np = of_get_parent(np); + struct device_node *parent_np __free(device_node) = of_get_parent(np); _clockgen_init(parent_np, true); - of_node_put(parent_np); } } |