[Freedreno] [PATCH v2] drm/msm/dpu: Fix memory leak in msm_mdss_parse_data_bus_icc_path

2022-12-06 Thread Miaoqian Lin
of_icc_get() alloc resources for path1, we should release it when not need anymore. Early return when IS_ERR_OR_NULL(path0) may leak path1. Defer getting path1 to fix this. Fixes: b9364eed9232 ("drm/msm/dpu: Move min BW request and full BW disable back to mdss") Signed-off-by: Mi

[Freedreno] [PATCH] drm/msm/dpu: Fix memory leak in msm_mdss_parse_data_bus_icc_path

2022-12-05 Thread Miaoqian Lin
ned-off-by: Miaoqian Lin --- drivers/gpu/drm/msm/msm_mdss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c index e13c5c12b775..a38fa9a9a3d6 100644 --- a/drivers/gpu/drm/msm/msm_mdss.c +++ b/drivers/gpu/drm/msm/

Re: [Freedreno] [PATCH] drm/msm/mdp4: Fix refcount leak in mdp4_modeset_init_intf

2022-06-14 Thread Miaoqian Lin
Hi, Abhinav On 2022/6/11 7:20, Abhinav Kumar wrote: > > > On 6/7/2022 4:08 AM, Miaoqian Lin wrote: >> of_graph_get_remote_node() returns remote device node pointer with >> refcount incremented, we should use of_node_put() on it >> when not need anymore. >> A

[Freedreno] [PATCH] drm/msm/mdp4: Fix refcount leak in mdp4_modeset_init_intf

2022-06-07 Thread Miaoqian Lin
of_graph_get_remote_node() returns remote device node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 86418f90a4c1 ("drm: convert drivers to use of_graph_get_remote_node") Signed-off-by

[Freedreno] [PATCH] drm/msm/a6xx: Fix refcount leak in a6xx_gpu_init

2022-05-12 Thread Miaoqian Lin
d the node after usage. Add missing of_node_put() to avoid refcount leak. Fixes: 4b565ca5a2cb ("drm/msm: Add A6XX device support") Signed-off-by: Miaoqian Lin --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_g

[Freedreno] [PATCH] drm/msm/hdmi: Fix missing put_device() call in msm_hdmi_get_phy

2022-01-07 Thread Miaoqian Lin
The reference taken by 'of_find_device_by_node()' must be released when not needed anymore. Add the corresponding 'put_device()' in the error handling path. Fixes: e00012b256d4 ("drm/msm/hdmi: Make HDMI core get its PHY") Signed-off-by: Miaoqian Lin --- drive

[Freedreno] [PATCH] drm/msm/dsi: Fix missing put_device() call in dsi_get_phy

2021-12-30 Thread Miaoqian Lin
If of_find_device_by_node() succeeds, dsi_get_phy() doesn't a corresponding put_device(). Thus add put_device() to fix the exception handling. Fixes: ec31abf ("drm/msm/dsi: Separate PHY to another platform device") Signed-off-by: Miaoqian Lin --- drivers/gpu/drm/msm/dsi/dsi.c