linux_dsm_epyc7002/drivers/gpu/drm/amd/powerplay
Dan Carpenter ea6d8811f1 drm/amd/powerplay: Fix error handling in smu_init_fb_allocations()
The error handling is off by one.  We should not free the first
"tables[i].bo" without decrementing "i" because that might result in a
double free.  The second problem is that when an error occurs, then the
zeroth element "tables[0].bo" isn't freed.

I had make "i" signed int for the error handling to work, so I just
updated "ret" as well as a clean up.

Fixes: f96357a991 ("drm/amd/powerplay: implement smu_init(fini)_fb_allocations function")
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2019-10-07 15:10:56 -05:00
..
hwmgr drm/amd/powerplay: correct Vega20 dpm level related settings 2019-08-27 10:09:12 -05:00
inc drm/amd/powerplay: update the interface for getting dpm full scale clock frequency 2019-10-03 09:11:04 -05:00
smumgr drm/amdgpu: Drop unused variable and statement 2019-10-03 09:11:06 -05:00
amd_powerplay.c drm/amdgpu: Add smu lock around in pp_smu_i2c_bus_access 2019-09-13 17:50:04 -05:00
amdgpu_smu.c drm/amd/powerplay: Fix error handling in smu_init_fb_allocations() 2019-10-07 15:10:56 -05:00
arcturus_ppt.c drm/amd/powerplay: add sensor lock support for smu 2019-10-03 09:11:04 -05:00
arcturus_ppt.h drm/amd/powerplay: update arcturus_ppt.c/h V3 2019-07-30 23:48:33 -05:00
Makefile drm/amdgpu/powerplay: add smu ip block for renoir (v2) 2019-08-22 17:36:58 -05:00
navi10_ppt.c drm/amd/powerplay: add sensor lock support for smu 2019-10-03 09:11:04 -05:00
navi10_ppt.h drm/amd/powerplay: custom peak clock freq for navi10 2019-07-22 14:57:06 -05:00
renoir_ppt.c drm/amd/powerplay: update the interface for getting dpm full scale clock frequency 2019-10-03 09:11:04 -05:00
renoir_ppt.h drm/amd/powerplay: implement sysfs for getting dpm clock 2019-09-13 17:49:19 -05:00
smu_v11_0.c drm/amd/powerplay: implement the interface for setting soft freq range 2019-10-03 09:11:04 -05:00
smu_v12_0.c drm/amd/powerplay: update the interface for getting dpm full scale clock frequency 2019-10-03 09:11:04 -05:00
vega20_ppt.c drm/amd/powerplay: add sensor lock support for smu 2019-10-03 09:11:04 -05:00
vega20_ppt.h drm/amd/powerplay: simplified od_settings for each asic 2019-06-21 18:59:32 -05:00