Subject: Re: [PATCH net-next v2] l2tp: remove unneeded null check in l2tp_v2_session_get_next

From: Simon Horman <[email-masked]>
Date: Tue, 3 Sep 2024 17:35:49 +0100

On Tue, Sep 03, 2024 at 12:35:47PM +0100, James Chapman wrote:
> Commit aa92c1cec92b ("l2tp: add tunnel/session get_next helpers") uses
> idr_get_next APIs to iterate over l2tp session IDR lists.  Sessions in
> l2tp_v2_session_idr always have a non-null session->tunnel pointer
> since l2tp_session_register sets it before inserting the session into
> the IDR. Therefore the null check on session->tunnel in
> l2tp_v2_session_get_next is redundant and can be removed. Removing the
> check avoids a warning from lkp.
> 
> Reported-by: kernel test robot <[email-masked]>
> Closes: https://lore.kernel.org/r/[email-masked]/
> CC: Dan Carpenter <[email-masked]>
> Signed-off-by: James Chapman <[email-masked]>
> Acked-by: Tom Parkin <[email-masked]>
> ---
> 
>  v2: improve commit log and use acked-by tag
>  v1: https://lore.kernel.org/netdev/[email-masked]/
> 

Thanks for the update.

Reviewed-by: Simon Horman <[email-masked]>