linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] PM / devfreq: exynos-ppmu: remove unneeded of_node_put()
@ 2016-07-08 13:44 weiyj_lk at 163.com
  2016-07-11  2:19 ` MyungJoo Ham
  0 siblings, 1 reply; 4+ messages in thread
From: weiyj_lk at 163.com @ 2016-07-08 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

for_each_child_of_node() performs an of_node_put() on each iteration, so
putting an of_node_put() before a continue results in a double put.

Generated by: scripts/coccinelle/iterators/device_node_continue.cocci

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/devfreq/event/exynos-ppmu.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
index 845bf25..f55cf0e 100644
--- a/drivers/devfreq/event/exynos-ppmu.c
+++ b/drivers/devfreq/event/exynos-ppmu.c
@@ -406,8 +406,6 @@ static int of_get_devfreq_events(struct device_node *np,
 		of_property_read_string(node, "event-name", &desc[j].name);
 
 		j++;
-
-		of_node_put(node);
 	}
 	info->desc = desc;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH -next] PM / devfreq: exynos-ppmu: remove unneeded of_node_put()
  2016-07-08 13:44 [PATCH -next] PM / devfreq: exynos-ppmu: remove unneeded of_node_put() weiyj_lk at 163.com
@ 2016-07-11  2:19 ` MyungJoo Ham
  2016-07-11 13:08   ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: MyungJoo Ham @ 2016-07-11  2:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 8, 2016 at 10:44 PM,  <weiyj_lk@163.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> for_each_child_of_node() performs an of_node_put() on each iteration, so
> putting an of_node_put() before a continue results in a double put.
>
> Generated by: scripts/coccinelle/iterators/device_node_continue.cocci
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Thank you!

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>


> ---
>  drivers/devfreq/event/exynos-ppmu.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
> index 845bf25..f55cf0e 100644
> --- a/drivers/devfreq/event/exynos-ppmu.c
> +++ b/drivers/devfreq/event/exynos-ppmu.c
> @@ -406,8 +406,6 @@ static int of_get_devfreq_events(struct device_node *np,
>                 of_property_read_string(node, "event-name", &desc[j].name);
>
>                 j++;
> -
> -               of_node_put(node);
>         }
>         info->desc = desc;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
MyungJoo Ham, Ph.D.
Frontier CS Lab, S/W Center, Samsung Electronics

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH -next] PM / devfreq: exynos-ppmu: remove unneeded of_node_put()
  2016-07-11  2:19 ` MyungJoo Ham
@ 2016-07-11 13:08   ` Rafael J. Wysocki
  2016-07-12  8:23     ` MyungJoo Ham
  0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2016-07-11 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 11, 2016 at 4:19 AM, MyungJoo Ham <myungjoo.ham@samsung.com> wrote:
> On Fri, Jul 8, 2016 at 10:44 PM,  <weiyj_lk@163.com> wrote:
>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>
>> for_each_child_of_node() performs an of_node_put() on each iteration, so
>> putting an of_node_put() before a continue results in a double put.
>>
>> Generated by: scripts/coccinelle/iterators/device_node_continue.cocci
>>
>> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Thank you!
>
> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>

Do you want me to apply this one directly?

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH -next] PM / devfreq: exynos-ppmu: remove unneeded of_node_put()
  2016-07-11 13:08   ` Rafael J. Wysocki
@ 2016-07-12  8:23     ` MyungJoo Ham
  0 siblings, 0 replies; 4+ messages in thread
From: MyungJoo Ham @ 2016-07-12  8:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 11, 2016 at 10:08 PM, Rafael J. Wysocki <rafael@kernel.org> wrote:
> On Mon, Jul 11, 2016 at 4:19 AM, MyungJoo Ham <myungjoo.ham@samsung.com> wrote:
>> On Fri, Jul 8, 2016 at 10:44 PM,  <weiyj_lk@163.com> wrote:
>>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>>
>>> for_each_child_of_node() performs an of_node_put() on each iteration, so
>>> putting an of_node_put() before a continue results in a double put.
>>>
>>> Generated by: scripts/coccinelle/iterators/device_node_continue.cocci
>>>
>>> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>
>> Thank you!
>>
>> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
>
> Do you want me to apply this one directly?

Sure, if you would do that, it'd be great.

Thank you.



Cheers,
MyungJoo


-- 
MyungJoo Ham, Ph.D.
S/W R&D Center, Samsung Electronics

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-12  8:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-08 13:44 [PATCH -next] PM / devfreq: exynos-ppmu: remove unneeded of_node_put() weiyj_lk at 163.com
2016-07-11  2:19 ` MyungJoo Ham
2016-07-11 13:08   ` Rafael J. Wysocki
2016-07-12  8:23     ` MyungJoo Ham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).