From: Mario Limonciello <mario.limoncie...@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.limoncie...@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

Reply via email to