aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/pm/amdgpu_pm.c
diff options
context:
space:
mode:
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>2024-02-23 17:08:16 +0530
committerAlex Deucher <alexander.deucher@amd.com>2024-02-27 11:06:58 -0500
commiteb4f139888f636614dab3bcce97ff61cefc4b3a7 (patch)
tree67876c5e06c752d92d98ff1daad9519a17478e2e /drivers/gpu/drm/amd/pm/amdgpu_pm.c
parent7cf1ad2fe10634238b38442a851d89514cb14ea2 (diff)
downloadlinux-eb4f139888f636614dab3bcce97ff61cefc4b3a7.tar.gz
linux-eb4f139888f636614dab3bcce97ff61cefc4b3a7.tar.bz2
linux-eb4f139888f636614dab3bcce97ff61cefc4b3a7.zip
drm/amd/amdgpu: Fix potential ioremap() memory leaks in amdgpu_device_init()
This ensures that the memory mapped by ioremap for adev->rmmio, is properly handled in amdgpu_device_init(). If the function exits early due to an error, the memory is unmapped. If the function completes successfully, the memory remains mapped. Reported by smatch: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4337 amdgpu_device_init() warn: 'adev->rmmio' from ioremap() not released on lines: 4035,4045,4051,4058,4068,4337 Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/amdgpu_pm.c')
0 files changed, 0 insertions, 0 deletions