Re: [PATCH] tilcdc: tilcdc_external: fix an incorrect NULL check on list iterator

2022-03-27 Thread Jyri Sarha
On 2022-03-27 9:15, Xiaomeng Tong wrote: The bug is here: if (!encoder) { The list iterator value 'encoder' will *always* be set and non-NULL by list_for_each_entry(), so it is incorrect to assume that the iterator value will be NULL if the list is empty or no element is found. To fix t

[PATCH] tilcdc: tilcdc_external: fix an incorrect NULL check on list iterator

2022-03-26 Thread Xiaomeng Tong
The bug is here: if (!encoder) { The list iterator value 'encoder' will *always* be set and non-NULL by list_for_each_entry(), so it is incorrect to assume that the iterator value will be NULL if the list is empty or no element is found. To fix the bug, use a new variable 'iter' as the li