Re: [PATCH 1/5] drm/amdgpu: Move a variable assignment behind a null pointer check in amdgpu_ras_interrupt_dispatch()

2023-04-11 Thread Markus Elfring
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c >> @@ -1730,11 +1730,12 @@ int amdgpu_ras_interrupt_dispatch(struct >> amdgpu_device *adev, >>   struct ras_dispatch_if *info) >>   { >>   struct ras_manager *obj = amdgpu_ras_find_obj(adev, >head); >> -    struct ras_ih_data *data =

Re: [PATCH 1/5] drm/amdgpu: Move a variable assignment behind a null pointer check in amdgpu_ras_interrupt_dispatch()

2023-04-11 Thread Felix Kuehling
Am 2023-04-11 um 09:42 schrieb Markus Elfring: Date: Tue, 11 Apr 2023 10:52:48 +0200 The address of a data structure member was determined before a corresponding null pointer check in the implementation of the function “amdgpu_ras_interrupt_dispatch”. Thus avoid the risk for undefined

[PATCH 1/5] drm/amdgpu: Move a variable assignment behind a null pointer check in amdgpu_ras_interrupt_dispatch()

2023-04-11 Thread Markus Elfring
Date: Tue, 11 Apr 2023 10:52:48 +0200 The address of a data structure member was determined before a corresponding null pointer check in the implementation of the function “amdgpu_ras_interrupt_dispatch”. Thus avoid the risk for undefined behaviour by moving the assignment for the variable