]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/msm/adreno: Fix a reference leak in a6xx_gpu_init()
authorFelix Gu <ustc.gu@gmail.com>
Fri, 23 Jan 2026 16:37:38 +0000 (00:37 +0800)
committerRob Clark <robin.clark@oss.qualcomm.com>
Wed, 13 May 2026 21:07:27 +0000 (14:07 -0700)
commite64bca63647db1d5518198d6c5ca2dbcc66b182b
tree29bda94b5f04399326925ca65dd0d8d7c8ab3038
parent46e351e84853dda726072bb3d38ba7bd63e7532b
drm/msm/adreno: Fix a reference leak in a6xx_gpu_init()

In a6xx_gpu_init(), node is obtained via of_parse_phandle().
While there was a manual of_node_put() at the end of the
common path, several early error returns would bypass this call,
resulting in a reference leak.
Fix this by using the __free(device_node) cleanup handler to
release the reference when the variable goes out of scope.

Fixes: 5a903a44a984 ("drm/msm/a6xx: Introduce GMU wrapper support")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Patchwork: https://patchwork.freedesktop.org/patch/700661/
Message-ID: <20260124-a6xx_gpu-v1-1-fa0c8b2dcfb1@gmail.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
drivers/gpu/drm/msm/adreno/a6xx_gpu.c