Skip to content

Commit 02c87df

Browse files
windhlLaurentiu Palcu
authored andcommitted
drm/imx/dcss: Add missing of_node_put() in fail path
In dcss_dev_create() and dcss_dev_destroy(), we should call of_node_put() in fail path or before the dcss's destroy as of_graph_get_port_by_id() has increased the refcount. Fixes: 9021c31 ("drm/imx: Add initial support for DCSS on iMX8MQ") Signed-off-by: Liang He <[email protected]> Reviewed-by: Laurentiu Palcu <[email protected]> Signed-off-by: Laurentiu Palcu <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent ef2084a commit 02c87df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/imx/dcss/dcss-dev.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ struct dcss_dev *dcss_dev_create(struct device *dev, bool hdmi_output)
207207

208208
ret = dcss_submodules_init(dcss);
209209
if (ret) {
210+
of_node_put(dcss->of_port);
210211
dev_err(dev, "submodules initialization failed\n");
211212
goto clks_err;
212213
}
@@ -237,6 +238,8 @@ void dcss_dev_destroy(struct dcss_dev *dcss)
237238
dcss_clocks_disable(dcss);
238239
}
239240

241+
of_node_put(dcss->of_port);
242+
240243
pm_runtime_disable(dcss->dev);
241244

242245
dcss_submodules_stop(dcss);

0 commit comments

Comments
 (0)