if_stf: 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: 6d8fdfa9d5
Rework IP encapsulation handling code
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39746
This commit is contained in:
parent
04989ef426
commit
c373e1d6ad
@ -295,12 +295,6 @@ stf_clone_create(struct if_clone *ifc, char *name, size_t len,
|
||||
ifp->if_dunit = IF_DUNIT_NONE;
|
||||
|
||||
sc->encap_cookie = ip_encap_attach(&ipv4_encap_cfg, sc, M_WAITOK);
|
||||
if (sc->encap_cookie == NULL) {
|
||||
if_printf(ifp, "attach failed\n");
|
||||
free(sc, M_STF);
|
||||
ifc_free_unit(ifc, unit);
|
||||
return (ENOMEM);
|
||||
}
|
||||
|
||||
ifp->if_mtu = IPV6_MMTU;
|
||||
ifp->if_ioctl = stf_ioctl;
|
||||
|
Loading…
Reference in New Issue
Block a user