* [PATCH] drm/imx/dcss: Add missing of_node_put() in fail path
@ 2022-07-07 2:32 Liang He
2022-07-14 7:37 ` Laurentiu Palcu
0 siblings, 1 reply; 3+ messages in thread
From: Liang He @ 2022-07-07 2:32 UTC (permalink / raw)
To: laurentiu.palcu, l.stach, airlied, daniel, shawnguo, s.hauer,
festevam, linux-imx, dri-devel, windhl
In dcss_dev_create(), we should call of_node_put() in fail path for
of_graph_get_port_by_id() which will increase the refcount.
Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ")
Signed-off-by: Liang He <windhl@126.com>
---
drivers/gpu/drm/imx/dcss/dcss-dev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/imx/dcss/dcss-dev.c b/drivers/gpu/drm/imx/dcss/dcss-dev.c
index c849533ca83e..a99141538621 100644
--- a/drivers/gpu/drm/imx/dcss/dcss-dev.c
+++ b/drivers/gpu/drm/imx/dcss/dcss-dev.c
@@ -207,6 +207,7 @@ struct dcss_dev *dcss_dev_create(struct device *dev, bool hdmi_output)
ret = dcss_submodules_init(dcss);
if (ret) {
+ of_node_put(dcss->of_port);
dev_err(dev, "submodules initialization failed\n");
goto clks_err;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/imx/dcss: Add missing of_node_put() in fail path
2022-07-07 2:32 [PATCH] drm/imx/dcss: Add missing of_node_put() in fail path Liang He
@ 2022-07-14 7:37 ` Laurentiu Palcu
2022-07-14 7:53 ` Liang He
0 siblings, 1 reply; 3+ messages in thread
From: Laurentiu Palcu @ 2022-07-14 7:37 UTC (permalink / raw)
To: Liang He; +Cc: airlied, shawnguo, s.hauer, dri-devel, linux-imx
Hi Liang,
Thanks for the patch.
The patch is ok but, since you're at it, maybe add of_node_put() in the
dcss_dev_destroy() too?
Thanks,
laurentiu
On Thu, Jul 07, 2022 at 10:32:14AM +0800, Liang He wrote:
> In dcss_dev_create(), we should call of_node_put() in fail path for
> of_graph_get_port_by_id() which will increase the refcount.
>
> Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ")
> Signed-off-by: Liang He <windhl@126.com>
> ---
> drivers/gpu/drm/imx/dcss/dcss-dev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/imx/dcss/dcss-dev.c b/drivers/gpu/drm/imx/dcss/dcss-dev.c
> index c849533ca83e..a99141538621 100644
> --- a/drivers/gpu/drm/imx/dcss/dcss-dev.c
> +++ b/drivers/gpu/drm/imx/dcss/dcss-dev.c
> @@ -207,6 +207,7 @@ struct dcss_dev *dcss_dev_create(struct device *dev, bool hdmi_output)
>
> ret = dcss_submodules_init(dcss);
> if (ret) {
> + of_node_put(dcss->of_port);
> dev_err(dev, "submodules initialization failed\n");
> goto clks_err;
> }
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re:Re: [PATCH] drm/imx/dcss: Add missing of_node_put() in fail path
2022-07-14 7:37 ` Laurentiu Palcu
@ 2022-07-14 7:53 ` Liang He
0 siblings, 0 replies; 3+ messages in thread
From: Liang He @ 2022-07-14 7:53 UTC (permalink / raw)
To: Laurentiu Palcu; +Cc: airlied, shawnguo, s.hauer, dri-devel, linux-imx
[-- Attachment #1: Type: text/plain, Size: 1225 bytes --]
At 2022-07-14 15:37:41, "Laurentiu Palcu" <laurentiu.palcu@oss.nxp.com> wrote:
>Hi Liang,
>
>Thanks for the patch.
>
>The patch is ok but, since you're at it, maybe add of_node_put() in the
>dcss_dev_destroy() too?
>
Thanks, laurentiu,
I miss it and I will add it soon.
>Thanks,
>laurentiu
>
>On Thu, Jul 07, 2022 at 10:32:14AM +0800, Liang He wrote:
>> In dcss_dev_create(), we should call of_node_put() in fail path for
>> of_graph_get_port_by_id() which will increase the refcount.
>>
>> Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ")
>> Signed-off-by: Liang He <windhl@126.com>
>> ---
>> drivers/gpu/drm/imx/dcss/dcss-dev.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/imx/dcss/dcss-dev.c b/drivers/gpu/drm/imx/dcss/dcss-dev.c
>> index c849533ca83e..a99141538621 100644
>> --- a/drivers/gpu/drm/imx/dcss/dcss-dev.c
>> +++ b/drivers/gpu/drm/imx/dcss/dcss-dev.c
>> @@ -207,6 +207,7 @@ struct dcss_dev *dcss_dev_create(struct device *dev, bool hdmi_output)
>>
>> ret = dcss_submodules_init(dcss);
>> if (ret) {
>> + of_node_put(dcss->of_port);
>> dev_err(dev, "submodules initialization failed\n");
>> goto clks_err;
>> }
>> --
>> 2.25.1
>>
[-- Attachment #2: Type: text/html, Size: 1582 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-14 7:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07 2:32 [PATCH] drm/imx/dcss: Add missing of_node_put() in fail path Liang He
2022-07-14 7:37 ` Laurentiu Palcu
2022-07-14 7:53 ` Liang He
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.