aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenlei Huang <zlei@FreeBSD.org>2023-04-23 04:47:57 +0000
committerZhenlei Huang <zlei@FreeBSD.org>2023-04-23 04:47:57 +0000
commitb658c0fce10a06493dc468fc9f6699120473e17b (patch)
tree543c946a90c3bf79b77733522d791b1af5815458
parentc373e1d6adbc3785e8f1072cdc4a062733baa514 (diff)
downloadsrc-b658c0fce10a06493dc468fc9f6699120473e17b.tar.gz
src-b658c0fce10a06493dc468fc9f6699120473e17b.zip
ip_mroute: Delete unreachable code
As the flag M_WAITOK is passed to ip_encap_attach(), then the function will never return NULL, and the following code within NULL check branch will be unreachable. No functional change intended. Reviewed by: kp Fixes: 6d8fdfa9d5e7d Rework IP encapsulation handling code MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39746
-rw-r--r--sys/netinet/ip_mroute.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index 15abe168e5c2..ac5e1c5f09c6 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -2821,11 +2821,6 @@ ip_mroute_modevent(module_t mod, int type, void *unused)
&pim_squelch_wholepkt);
pim_encap_cookie = ip_encap_attach(&ipv4_encap_cfg, NULL, M_WAITOK);
- if (pim_encap_cookie == NULL) {
- printf("ip_mroute: unable to attach pim encap\n");
- MRW_LOCK_DESTROY();
- return (EINVAL);
- }
ip_mcast_src = X_ip_mcast_src;
ip_mforward = X_ip_mforward;