diff mbox

[1/2] hwspinlock: qcom_hwspinlock: add missing of_node_put after calling of_parse_phandle

Message ID 1467684664-21155-1-git-send-email-peter.chen@nxp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Chen July 5, 2016, 2:11 a.m. UTC
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/hwspinlock/qcom_hwspinlock.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Bjorn Andersson July 6, 2016, 7:35 p.m. UTC | #1
On Mon 04 Jul 19:11 PDT 2016, 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: linux-arm-kernel@lists.infradead.org
> Cc: linux-arm-msm@vger.kernel.org
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

Applied.

Please use get_maintainer.pl to find out whom to send patches to, I
only stumbled upon this while looking for something else.

Thanks,
Bjorn

> ---
>  drivers/hwspinlock/qcom_hwspinlock.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hwspinlock/qcom_hwspinlock.c b/drivers/hwspinlock/qcom_hwspinlock.c
> index c752447..fa6880b 100644
> --- a/drivers/hwspinlock/qcom_hwspinlock.c
> +++ b/drivers/hwspinlock/qcom_hwspinlock.c
> @@ -98,6 +98,7 @@ static int qcom_hwspinlock_probe(struct platform_device *pdev)
>  	}
>  
>  	regmap = syscon_node_to_regmap(syscon);
> +	of_node_put(syscon);
>  	if (IS_ERR(regmap))
>  		return PTR_ERR(regmap);
>  
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Peter Chen July 7, 2016, 1:18 a.m. UTC | #2
>On Mon 04 Jul 19:11 PDT 2016, 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: linux-arm-kernel@lists.infradead.org
>> Cc: linux-arm-msm@vger.kernel.org
>> Signed-off-by: Peter Chen <peter.chen@nxp.com>
>
>Applied.
>
>Please use get_maintainer.pl to find out whom to send patches to, I only stumbled
>upon this while looking for something else.
>

There is no maintainer for this file. Below is the output for get_maintainer.pl:

$ ./scripts/get_maintainer.pl patch_0705_2/0001-hwspinlock-qcom_hwspinlock-add-missing-of_node_put-a.patch 
linux-kernel@vger.kernel.org (open list)


Thanks,
Peter
Bjorn Andersson July 7, 2016, 3:50 a.m. UTC | #3
On Wed 06 Jul 18:18 PDT 2016, Peter Chen wrote:

>  
> >On Mon 04 Jul 19:11 PDT 2016, 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: linux-arm-kernel@lists.infradead.org
> >> Cc: linux-arm-msm@vger.kernel.org
> >> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> >
> >Applied.
> >
> >Please use get_maintainer.pl to find out whom to send patches to, I only stumbled
> >upon this while looking for something else.
> >
> 
> There is no maintainer for this file. Below is the output for get_maintainer.pl:
> 
> $ ./scripts/get_maintainer.pl patch_0705_2/0001-hwspinlock-qcom_hwspinlock-add-missing-of_node_put-a.patch 
> linux-kernel@vger.kernel.org (open list)
> 

That's not good, sorry about that! I sent out a patch including the
other files as well as hwlock related dt bindings.

Regards,
Bjorn
diff mbox

Patch

diff --git a/drivers/hwspinlock/qcom_hwspinlock.c b/drivers/hwspinlock/qcom_hwspinlock.c
index c752447..fa6880b 100644
--- a/drivers/hwspinlock/qcom_hwspinlock.c
+++ b/drivers/hwspinlock/qcom_hwspinlock.c
@@ -98,6 +98,7 @@  static int qcom_hwspinlock_probe(struct platform_device *pdev)
 	}
 
 	regmap = syscon_node_to_regmap(syscon);
+	of_node_put(syscon);
 	if (IS_ERR(regmap))
 		return PTR_ERR(regmap);