Re: fbdev: arkfb: Move a variable assignment behind a condition check in ics5342_init()

Helge Deller <[email protected]> Sat, 18 Jul 2026 22:59:58 +0200
Newsgroups gmane.linux.kernel.janitors,gmane.comp.video.dri.devel,gmane.linux.kernel
Message-ID <[email protected]>
On 7/18/26 22:34, Markus Elfring wrote:
>>> The address of a data structure member was determined before
>>> a corresponding null pointer check in the implementation of
>>> the function =E2=80=9Cics5342_init=E2=80=9D.
>>>
>>> Thus avoid the risk for undefined behaviour by moving the assignment
>>> for the variable =E2=80=9Cinfo=E2=80=9D behind a condition check.
>>>
>>> This issue was detected by using the Coccinelle software.
>>
>> There is no "risk" here.
>> It just adds an offset to a potential NULL value (which isn't then used=
 afterwards).
> Does your understanding of programming language details differ from the =
view of
> SEI CERT C Coding Standard (from the Carnegie Mellon University)?
> https://cmu-sei.github.io/secure-coding-standards/sei-cert-c-coding-stan=
dard/rules/expressions-exp/exp34-c/
My statement still stands.
Try to find the difference between the code and the examples on that websi=
te yourself.
Tip: The relevant part is the "&" and in doubt look at the generated assem=
bly code.

I will not discuss this further.

Helge