Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1436175 > unrolled thread
| Started by | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| First post | 2016-07-04 05:40 +0200 |
| Last post | 2016-07-04 05:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2 1/1] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle Chanwoo Choi <cw00.choi@samsung.com> - 2016-07-04 05:40 +0200
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Date | 2016-07-04 05:40 +0200 |
| Subject | Re: [PATCH v2 1/1] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle |
| Message-ID | <rR2TL-tc-1@gated-at.bofh.it> |
On 2016년 07월 04일 11:47, Peter Chen wrote:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
>
> Changes at v2:
> - It should define node as pointer, kbuild test robot reports it
>
>
> drivers/devfreq/exynos-bus.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> index 2363d0a..4b4c63c 100644
> --- a/drivers/devfreq/exynos-bus.c
> +++ b/drivers/devfreq/exynos-bus.c
> @@ -383,7 +383,7 @@ err_clk:
> static int exynos_bus_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> - struct device_node *np = dev->of_node;
> + struct device_node *node, *np = dev->of_node;
> struct devfreq_dev_profile *profile;
> struct devfreq_simple_ondemand_data *ondemand_data;
> struct devfreq_passive_data *passive_data;
> @@ -415,10 +415,13 @@ static int exynos_bus_probe(struct platform_device *pdev)
> goto err;
> }
>
> - if (of_parse_phandle(dev->of_node, "devfreq", 0))
> + node = of_parse_phandle(dev->of_node, "devfreq", 0);
> + if (node) {
> + of_node_put(node);
> goto passive;
> - else
> + } else {
> ret = exynos_bus_parent_parse_of(np, bus);
> + }
>
> if (ret < 0)
> goto err;
>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Thanks,
Chanwoo Choi
Back to top | Article view | linux.kernel
csiph-web