Commit 5d061675 authored by Luben Tuikov's avatar Luben Tuikov Committed by Alex Deucher

drm/amdgpu: Fix a memory leak

Fix a memory leak in amdgpu_fru_get_product_info().

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Reported-by: default avatarYang Wang <kevinyang.wang@amd.com>
Fixes: 0dbf2c56 ("drm/amdgpu: Interpret IPMI data for product information (v2)")
Signed-off-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
Reviewed-by: default avatarAlex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4953856f
...@@ -170,6 +170,7 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev) ...@@ -170,6 +170,7 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev)
csum += pia[size - 1]; csum += pia[size - 1];
if (csum) { if (csum) {
DRM_ERROR("Bad Product Info Area checksum: 0x%02x", csum); DRM_ERROR("Bad Product Info Area checksum: 0x%02x", csum);
kfree(pia);
return -EIO; return -EIO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment