drm/amd/display: Delete a redundant memory setting in amdgpu_dm_irq_register_interrupt()
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 17 Jun 2019 11:56:39 +0000 (13:56 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 17 Jun 2019 16:02:03 +0000 (11:02 -0500)
The memory was set to zero already by a call of the function “kzalloc”.
Thus remove an extra call of the function “memset” for this purpose.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c

index fd22b4474dbf44b352538e3d100c39d018a51fa3..4e6da61d1a93c934977ca4bf25bfe4eebdef41ce 100644 (file)
@@ -279,8 +279,6 @@ void *amdgpu_dm_irq_register_interrupt(struct amdgpu_device *adev,
                return DAL_INVALID_IRQ_HANDLER_IDX;
        }
 
-       memset(handler_data, 0, sizeof(*handler_data));
-
        init_handler_common_data(handler_data, ih, handler_args, &adev->dm);
 
        irq_source = int_params->irq_source;