Re: [Nouveau] [PATCH] dispnv50: atom: fix an incorrect NULL check on list iterator

2022-04-02 Thread Xiaomeng Tong
on Sun, 27 Mar 2022 16:59:28 +0100, Emil Velikov wrote: > On Sun, 27 Mar 2022 at 08:39, Xiaomeng Tong wrote: > > > > The bug is here: > > return encoder; > > > > The list iterator value 'encoder' will *always* be set and non-NULL > > by drm_for_each_encoder_mask(), so it is incorrect to

Re: [Nouveau] [PATCH] dispnv50: atom: fix an incorrect NULL check on list iterator

2022-03-29 Thread Emil Velikov
On Mon, 28 Mar 2022 at 03:09, Xiaomeng Tong wrote: > > on Sun, 27 Mar 2022 16:59:28 +0100, Emil Velikov wrote: > > On Sun, 27 Mar 2022 at 08:39, Xiaomeng Tong wrote: > > > > > > The bug is here: > > > return encoder; > > > > > > The list iterator value 'encoder' will *always* be set and

Re: [Nouveau] [PATCH] dispnv50: atom: fix an incorrect NULL check on list iterator

2022-03-28 Thread Lyude Paul
Reviewed-by: Lyude Paul Will push this to the appropriate repository shortly. On Sun, 2022-03-27 at 15:39 +0800, Xiaomeng Tong wrote: > The bug is here: > return encoder; > > The list iterator value 'encoder' will *always* be set and non-NULL > by drm_for_each_encoder_mask(), so it is

Re: [Nouveau] [PATCH] dispnv50: atom: fix an incorrect NULL check on list iterator

2022-03-27 Thread Emil Velikov
On Sun, 27 Mar 2022 at 08:39, Xiaomeng Tong wrote: > > The bug is here: > return encoder; > > The list iterator value 'encoder' will *always* be set and non-NULL > by drm_for_each_encoder_mask(), so it is incorrect to assume that the > iterator value will be NULL if the list is empty or

[Nouveau] [PATCH] dispnv50: atom: fix an incorrect NULL check on list iterator

2022-03-27 Thread Xiaomeng Tong
The bug is here: return encoder; The list iterator value 'encoder' will *always* be set and non-NULL by drm_for_each_encoder_mask(), so it is incorrect to assume that the iterator value will be NULL if the list is empty or no element found. Otherwise it will bypass some NULL checks and