From: Monk Liu Date: Fri, 27 May 2016 11:34:11 +0000 (+0800) Subject: drm/amdgpu: fix mem leak in atombios X-Git-Tag: MMI-PSA29.97-13-9~7713^2~10^2~14 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=89e0ec9f5e27a8c5b5954290bef703dc6aac44f3;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drm/amdgpu: fix mem leak in atombios Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 1727a4d998a4..964f31404f17 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -827,8 +827,10 @@ static uint32_t cail_ioreg_read(struct card_info *info, uint32_t reg) */ static void amdgpu_atombios_fini(struct amdgpu_device *adev) { - if (adev->mode_info.atom_context) + if (adev->mode_info.atom_context) { kfree(adev->mode_info.atom_context->scratch); + kfree(adev->mode_info.atom_context->iio); + } kfree(adev->mode_info.atom_context); adev->mode_info.atom_context = NULL; kfree(adev->mode_info.atom_card_info);