[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1650607437-22275-1-git-send-email-baihaowen@meizu.com>
Date: Fri, 22 Apr 2022 14:03:57 +0800
From: Haowen Bai <baihaowen@...zu.com>
To: Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
"Pan, Xinhui" <Xinhui.Pan@....com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>
CC: Haowen Bai <baihaowen@...zu.com>, <amd-gfx@...ts.freedesktop.org>,
<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] drm/amdgpu: Remove useless kfree
After alloc fail, we do not need to kfree.
Signed-off-by: Haowen Bai <baihaowen@...zu.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index ec709997c9c7..5fb3e69c04c4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -1849,7 +1849,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;
}
--
2.7.4
Powered by blists - more mailing lists