summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-10-07 12:02:06 +0300
committerAlex Deucher <alexander.deucher@amd.com>2019-10-07 15:10:56 -0500
commitea6d8811f18521a2188d1959f5fa2447e6bf5349 (patch)
treec106a9c49d87d7137c4e380e666682b8ccbc66f8 /drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h
parentfa073f13a218627f1cfd5bca223d5938ee6cd985 (diff)
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: f96357a991b9 ("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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h')
0 files changed, 0 insertions, 0 deletions