linux-stable/net/l2tp
James Chapman 510c0732fc l2tp: remove unneeded null check in l2tp_v2_session_get_next
Commit aa92c1cec9 ("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 <lkp@intel.com>
Closes: https://lore.kernel.org/r/202408111407.HtON8jqa-lkp@intel.com/
CC: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: James Chapman <jchapman@katalix.com>
Acked-by: Tom Parkin <tparkin@katalix.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240903113547.1261048-1-jchapman@katalix.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-04 16:39:32 -07:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
l2tp_core.c l2tp: remove unneeded null check in l2tp_v2_session_get_next 2024-09-04 16:39:32 -07:00
l2tp_core.h l2tp: improve tunnel/session refcount helpers 2024-08-11 04:38:50 +01:00
l2tp_debugfs.c l2tp: improve tunnel/session refcount helpers 2024-08-11 04:38:50 +01:00
l2tp_eth.c netdev_features: convert NETIF_F_LLTX to dev->lltx 2024-09-03 11:36:43 +02:00
l2tp_ip.c l2tp: use skb_queue_purge in l2tp_ip_destroy_sock 2024-08-20 16:52:28 -07:00
l2tp_ip6.c l2tp: improve tunnel/session refcount helpers 2024-08-11 04:38:50 +01:00
l2tp_netlink.c l2tp: improve tunnel/session refcount helpers 2024-08-11 04:38:50 +01:00
l2tp_ppp.c l2tp: improve tunnel/session refcount helpers 2024-08-11 04:38:50 +01:00
Makefile l2tp: add tracepoint infrastructure to core 2020-08-22 12:44:37 -07:00
trace.h l2tp: add tracepoint definitions in trace.h 2020-08-22 12:44:37 -07:00