]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/a6xx: Fix refcount leak in a6xx_gpu_init
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 12 May 2022 12:19:50 +0000 (16:19 +0400)
committerRob Clark <robdclark@chromium.org>
Wed, 18 May 2022 17:54:39 +0000 (10:54 -0700)
commit9624ae7570130a937493a2d76b6c3caab9b98cd0
treef2da885060979731f83c9b49dfc76ccbe338c217
parent389e1a53f2ec0bdef5546a6e9f53258d913a498c
drm/msm/a6xx: Fix refcount leak in a6xx_gpu_init

of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.

a6xx_gmu_init() passes the node to of_find_device_by_node()
and of_dma_configure(), of_find_device_by_node() will takes its
reference, of_dma_configure() doesn't need the node after usage.

Add missing of_node_put() to avoid refcount leak.

Fixes: 8d642c9c76ed ("drm/msm: Add A6XX device support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
Link: https://lore.kernel.org/r/20220512121955.56937-1-linmq006@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/a6xx_gpu.c