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 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 list iterator,
> while use the old variable 'encoder/bridge' as a dedicated pointer
> to point to the found element.
>
> Cc: [email protected]
> Fixes: 99e360442f223 ("drm/stm: Fix bus_flags handling")
> Signed-off-by: Xiaomeng Tong <[email protected]>
> ---
>  drivers/gpu/drm/stm/ltdc.c | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)


Thanks for your fix

Acked-by: Raphael Gallais-Pou <[email protected]>


Raphaƫl Gallais-Pou

Reply via email to