What can we do to fix this one? regards, dan carpenter On Wed, Nov 30, 2016 at 10:19:21PM +0300, Dan Carpenter wrote: > 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 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel