>>> The address of a data structure member was determined before
>>> a corresponding null pointer check in the implementation of
>>> the function “intel_bios_encoder_supports_dp_dual_mode”.
>>>
>>> Thus avoid the risk for undefined behaviour by reducing the scope for
>>> the variable “child” behind condition checks.
>>>
>>> This issue was detected by using the Coccinelle software.
>>>
>>> Fixes: 044cbc7a74c136f12a80c855cadd1b085084aef1 ("drm/i915/bios: Nuke 
>>> DEVICE_TYPE_DP_DUAL_MODE_BITS")
>>> Cc: [email protected]
> 
> Please stop adding Fixes tags to these and talking about "undefined
> behavior" in the commit message.  Pointer math is defined...

What does hinder you to take additional information sources better into account?


> It's just a style preference on your part.
Do you find the guidance appropriate according to the SEI CERT C Coding 
Standard?
https://cmu-sei.github.io/secure-coding-standards/sei-cert-c-coding-standard/rules/expressions-exp/exp34-c/

Regards,
Markus

Reply via email to