[PATCH] staging: vchiq: Fix list_for_each exit tests
Greg Kroah-Hartman
gregkh at linuxfoundation.org
Thu Oct 1 08:56:50 UTC 2020
On Mon, Sep 28, 2020 at 12:11:03PM +0300, Dan Carpenter wrote:
> This code code here used to be list_for_each() and after the loop then
> the "entry" pointer was non-NULL if we found the correct entry or NULL
> if we couldn't find it. Then we changed the code to use list_for_each_entry()
> and so now the "entry" pointer is always non-NULL when we exit the loop.
>
> I have introduced a new "found" variable to say if we found the correct
> enty or not. I fixed one test by making it an else statement because
> that was more readable than testing "if (!found)".
>
> Fixes: 46e4b9ec4fa4 ("staging: vchiq_arm: use list_for_each_entry when accessing bulk_waiter_list")
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
> ---
> .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
This doesn't apply against my tree, what branch did you make it against?
thanks,
greg k-h
More information about the devel
mailing list