lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <5779D891.30405@samsung.com>
Date:	Mon, 04 Jul 2016 12:31:29 +0900
From:	Chanwoo Choi <cw00.choi@...sung.com>
To:	Peter Chen <peter.chen@....com>, myungjoo.ham@...sung.com,
	kyungmin.park@...sung.com
Cc:	linux-pm@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Kukjin Kim <kgene@...nel.org>,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>
Subject: Re: [PATCH v2 1/1] devfreq: exynos-bus: add missing of_node_put after
 calling of_parse_phandle

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@...sung.com>
> Cc: MyungJoo Ham <myungjoo.ham@...sung.com>
> Cc: Kyungmin Park <kyungmin.park@...sung.com>
> Cc: Kukjin Kim <kgene@...nel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@...sung.com>
> Signed-off-by: Peter Chen <peter.chen@....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@...sung.com>

Thanks,
Chanwoo Choi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ