[bug report] drm/amdgpu: impl late_fini for amdgpu_pp_ip
Dan Carpenter
dan.carpenter at oracle.com
Wed Nov 30 19:19:21 UTC 2016
Hello Monk Liu,
The patch 482587e3145e: "drm/amdgpu: impl late_fini for amdgpu_pp_ip"
from May 19, 2016, leads to the following static checker warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c:218 amdgpu_pp_late_fini()
warn: passing freed memory 'adev->powerplay.pp_handle'
drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
208 static void amdgpu_pp_late_fini(void *handle)
209 {
210 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
211
212 if (adev->pp_enabled) {
213 amdgpu_pm_sysfs_fini(adev);
214 amd_powerplay_fini(adev->powerplay.pp_handle);
^^^^^^^^^^^^^^^^^^^^^^^^^
This gets freed here.
215 }
216
217 if (adev->powerplay.ip_funcs->late_fini)
218 adev->powerplay.ip_funcs->late_fini(
219 adev->powerplay.pp_handle);
But we use it again here.
220 }
regards,
dan carpenter
More information about the dri-devel
mailing list