Re: [PATCH] stm: ltdc: fix two incorrect NULL checks on list iterator

2022-04-07 Thread Philippe CORNU
On 3/28/22 14:37, Raphael Gallais-Pou wrote: Hello Xiaomeng On 3/27/22 07:53, Xiaomeng Tong wrote: The two bugs are here: if (encoder) { if (bridge && bridge->timings) The list iterator value 'encoder/bridge' will *always* be set and non-NULL by drm_for_each_encoder()/list_f

Re: [PATCH] stm: ltdc: fix two incorrect NULL checks on list iterator

2022-03-28 Thread Raphael Gallais-Pou
Hello Xiaomeng On 3/27/22 07:53, Xiaomeng Tong wrote: > The two bugs are here: > if (encoder) { > if (bridge && bridge->timings) > > The list iterator value 'encoder/bridge' will *always* be set and > non-NULL by drm_for_each_encoder()/list_for_each_entry(), so it is > incorrect to ass

[PATCH] stm: ltdc: fix two incorrect NULL checks on list iterator

2022-03-26 Thread Xiaomeng Tong
The two bugs are here: if (encoder) { if (bridge && bridge->timings) The list iterator value 'encoder/bridge' will *always* be set and non-NULL by drm_for_each_encoder()/list_for_each_entry(), so it is incorrect to assume that the iterator value will be NULL if the list is empty or