summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorHaowen Bai <baihaowen@meizu.com>2022-04-22 09:03:57 +0300
committerAlex Deucher <alexander.deucher@amd.com>2022-04-26 00:05:38 +0300
commitb3ef3205bc5e5d5a91f7ef53306686967c76492b (patch)
tree58e21d7acc38bbc03af2549f8be2366a9ef1b8e6 /drivers/gpu/drm
parenta2443ef0a8046ca98868224ee9bd6861c17e4995 (diff)
downloadlinux-b3ef3205bc5e5d5a91f7ef53306686967c76492b.tar.xz
drm/amdgpu: Remove useless kfree
After alloc fail, we do not need to kfree. Signed-off-by: Haowen Bai <baihaowen@meizu.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 03ce3ce913e4..7e126dff004f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -1921,7 +1921,6 @@ static int amdgpu_ras_realloc_eh_data_space(struct amdgpu_device *adev,
void *bps = kmalloc(align_space * sizeof(*data->bps), GFP_KERNEL);
if (!bps) {
- kfree(bps);
return -ENOMEM;
}