* [PATCH] fsl_hypervisor: Add missing of_node_put in fsl_hypervisor_init
@ 2021-10-29 3:20 He Ying
2021-11-09 2:07 ` He Ying
0 siblings, 1 reply; 2+ messages in thread
From: He Ying @ 2021-10-29 3:20 UTC (permalink / raw)
To: galak, timur, arnd; +Cc: linux-kernel
Early exits from for_each_compatible_node() should decrement the
node reference counter.
Signed-off-by: He Ying <heying24@huawei.com>
Fixes: 6db7199407ca ("drivers/virt: introduce Freescale hypervisor management driver")
---
drivers/virt/fsl_hypervisor.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/virt/fsl_hypervisor.c b/drivers/virt/fsl_hypervisor.c
index 46ee0a0998b6..ef5fcca4b8f0 100644
--- a/drivers/virt/fsl_hypervisor.c
+++ b/drivers/virt/fsl_hypervisor.c
@@ -849,8 +849,10 @@ static int __init fsl_hypervisor_init(void)
}
dbisr = kzalloc(sizeof(*dbisr), GFP_KERNEL);
- if (!dbisr)
+ if (!dbisr) {
+ of_node_put(np);
goto out_of_memory;
+ }
dbisr->irq = irq;
dbisr->doorbell = be32_to_cpup(handle);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fsl_hypervisor: Add missing of_node_put in fsl_hypervisor_init
2021-10-29 3:20 [PATCH] fsl_hypervisor: Add missing of_node_put in fsl_hypervisor_init He Ying
@ 2021-11-09 2:07 ` He Ying
0 siblings, 0 replies; 2+ messages in thread
From: He Ying @ 2021-11-09 2:07 UTC (permalink / raw)
To: galak, timur, arnd; +Cc: linux-kernel
kindly ping...
在 2021/10/29 11:20, He Ying 写道:
> Early exits from for_each_compatible_node() should decrement the
> node reference counter.
>
> Signed-off-by: He Ying <heying24@huawei.com>
> Fixes: 6db7199407ca ("drivers/virt: introduce Freescale hypervisor management driver")
> ---
> drivers/virt/fsl_hypervisor.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/virt/fsl_hypervisor.c b/drivers/virt/fsl_hypervisor.c
> index 46ee0a0998b6..ef5fcca4b8f0 100644
> --- a/drivers/virt/fsl_hypervisor.c
> +++ b/drivers/virt/fsl_hypervisor.c
> @@ -849,8 +849,10 @@ static int __init fsl_hypervisor_init(void)
> }
>
> dbisr = kzalloc(sizeof(*dbisr), GFP_KERNEL);
> - if (!dbisr)
> + if (!dbisr) {
> + of_node_put(np);
> goto out_of_memory;
> + }
>
> dbisr->irq = irq;
> dbisr->doorbell = be32_to_cpup(handle);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-09 2:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 3:20 [PATCH] fsl_hypervisor: Add missing of_node_put in fsl_hypervisor_init He Ying
2021-11-09 2:07 ` He Ying
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).