[PATCH] drm/mediatek: Initialize pointer before use to avoid undefiend behaviour

Karan Sanghavi karansanghvi98 at gmail.com
Fri Dec 27 01:51:25 PST 2024


On Tue, Dec 24, 2024 at 05:09:54PM +0100, Markus Elfring wrote:
> > Initialize the pointer with NULL as mtk_drm_of_get_ddp_ep_cid
> > function might return before assigning value to next pointer
> > but yet further dereference to next can lead to some undefined
> > behavior as it may point to some invalid location.
> 
> * You may occasionally put more than 62 characters into text lines
>   of such a change description.
> 
> * Please avoid a typo the summary phrase.
> 
yes sure. will keep that in mind for hte next patch. 
> 
>> > ---
> > Coverity Message:
> > CID 1601557: (#1 of 1): Uninitialized pointer read (UNINIT)
> > 3. uninit_use: Using uninitialized value next.
> 
> May such information become a part for the final change description?
>
Ofcourse, it shouldn't be the part of the change description. Thus i
have added them after the '---' due to which it wouldn't be the part of
the commit log (that's my uderstanding correct me if i am wrong). If it
still adds in the commit log do let me know as it hasn't been added for
other patches. 

it is just for the reference to understand more about what the error message
is generated by coverity scan.

Thank you,
karan.
> Regards,
> Markus



More information about the Linux-mediatek mailing list