[PATCH 2/5] drm/amd/display: Move three variable assignments behind condition checks in trigger_hotplug()

Markus Elfring Markus.Elfring at web.de
Tue May 16 16:40:26 UTC 2023


>> The address of a data structure member was determined before
>> a corresponding null pointer check in the implementation of
>> the function “trigger_hotplug”.
>>
>> Thus avoid the risk for undefined behaviour by moving the assignment
>> for three local variables behind some condition checks.
>
> It might be that the NULL check doesn't make sense in the first place, but since I'm not an expert for this code I can't fully judge.

Will the source code and patch review evolve any more?


> On the other hand the patches clearly look like nice cleanups to me, so feel free to add an Acked-by: Christian König <christian.koenig at amd.com> to the series.

Will such a positive feedback trigger any further collateral evolution?

Regards,
Markus


More information about the amd-gfx mailing list