Re: [PATCH] arm/mach-at91/pm: Do not double put the device node

2018-08-16 Thread zhong jiang
On 2018/8/16 17:32, Claudiu Beznea wrote: > Hi Alexandre, > > On 14.08.2018 15:59, Alexandre Belloni wrote: >> On 14/08/2018 09:54:56+0800, zhong jiang wrote: >>> Device node iterators put the previous value of the index variable, >>> so an explicit put causes a double put. >>> >> While

Re: [PATCH] arm/mach-at91/pm: Do not double put the device node

2018-08-16 Thread zhong jiang
On 2018/8/16 17:32, Claudiu Beznea wrote: > Hi Alexandre, > > On 14.08.2018 15:59, Alexandre Belloni wrote: >> On 14/08/2018 09:54:56+0800, zhong jiang wrote: >>> Device node iterators put the previous value of the index variable, >>> so an explicit put causes a double put. >>> >> While

Re: [PATCH] arm/mach-at91/pm: Do not double put the device node

2018-08-16 Thread Claudiu Beznea
Hi Alexandre, On 14.08.2018 15:59, Alexandre Belloni wrote: > On 14/08/2018 09:54:56+0800, zhong jiang wrote: >> Device node iterators put the previous value of the index variable, >> so an explicit put causes a double put. >> > > While for_each_matching_node_and_match will get and put the node

Re: [PATCH] arm/mach-at91/pm: Do not double put the device node

2018-08-16 Thread Claudiu Beznea
Hi Alexandre, On 14.08.2018 15:59, Alexandre Belloni wrote: > On 14/08/2018 09:54:56+0800, zhong jiang wrote: >> Device node iterators put the previous value of the index variable, >> so an explicit put causes a double put. >> > > While for_each_matching_node_and_match will get and put the node

Re: [PATCH] arm/mach-at91/pm: Do not double put the device node

2018-08-14 Thread Alexandre Belloni
On 14/08/2018 09:54:56+0800, zhong jiang wrote: > Device node iterators put the previous value of the index variable, > so an explicit put causes a double put. > While for_each_matching_node_and_match will get and put the node properly, there is also a call to of_find_device_by_node that will

Re: [PATCH] arm/mach-at91/pm: Do not double put the device node

2018-08-14 Thread Alexandre Belloni
On 14/08/2018 09:54:56+0800, zhong jiang wrote: > Device node iterators put the previous value of the index variable, > so an explicit put causes a double put. > While for_each_matching_node_and_match will get and put the node properly, there is also a call to of_find_device_by_node that will

[PATCH] arm/mach-at91/pm: Do not double put the device node

2018-08-13 Thread zhong jiang
Device node iterators put the previous value of the index variable, so an explicit put causes a double put. I detect the issue with the help of Coccinelle. Signed-off-by: zhong jiang --- arch/arm/mach-at91/pm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH] arm/mach-at91/pm: Do not double put the device node

2018-08-13 Thread zhong jiang
Device node iterators put the previous value of the index variable, so an explicit put causes a double put. I detect the issue with the help of Coccinelle. Signed-off-by: zhong jiang --- arch/arm/mach-at91/pm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git