[PATCH 02/14] drm/amd: Avoid showing an error about memory allocation in amdgpu_acpi_enumerate_xcc()
Mario Limonciello
superm1 at kernel.org
Thu Mar 27 20:38:46 UTC 2025
From: Mario Limonciello <mario.limonciello at amd.com>
checkpatch.pl complains about unnecessary error messages for failing
to allocate memory. These aren't needed when the return code is -ENOMEM.
Drop such a message from amdgpu_acpi_enumerate_xcc().
Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index 1c5994de5a723..840901d65fed7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -1116,10 +1116,8 @@ static int amdgpu_acpi_enumerate_xcc(void)
xcc_info = kzalloc(sizeof(struct amdgpu_acpi_xcc_info),
GFP_KERNEL);
- if (!xcc_info) {
- DRM_ERROR("Failed to allocate memory for xcc info\n");
+ if (!xcc_info)
return -ENOMEM;
- }
INIT_LIST_HEAD(&xcc_info->list);
xcc_info->handle = acpi_device_handle(acpi_dev);
--
2.43.0
More information about the amd-gfx
mailing list