diff options
author | Zhenlei Huang <zlei@FreeBSD.org> | 2024-06-28 10:16:29 +0000 |
---|---|---|
committer | Zhenlei Huang <zlei@FreeBSD.org> | 2024-10-08 10:07:18 +0000 |
commit | f500e5c6c99bd4520daa4524113462e3cf68f032 (patch) | |
tree | 2695bb80fb519021541ee99fc4c00172f14082f0 /sys/dev/qlxgb | |
parent | 04393db0031382a3b2d7de037e862b33e3ea4bbe (diff) |
net: Remove unneeded NULL check for the allocated ifnet
Change 4787572d0580 made if_alloc_domain() never fail, then also do the
wrappers if_alloc(), if_alloc_dev(), and if_gethandle().
No functional change intended.
Reviewed by: kp, imp, glebius, stevek
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D45740
MFC note: This is only a partial MFC, as some drivers do not exist in
stable/13 branch. The if_epair(4) drifts too much from stable/14 so not
included in this MFC.
(cherry picked from commit aa3860851b9f6a6002d135b1cac7736e0995eedc)
(cherry picked from commit 6b1f530935c5f84ec65dad87b7c20c6b7a72a6d3)
Diffstat (limited to 'sys/dev/qlxgb')
-rw-r--r-- | sys/dev/qlxgb/qla_os.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/dev/qlxgb/qla_os.c b/sys/dev/qlxgb/qla_os.c index 23d46b5171a6..af01cfa6829a 100644 --- a/sys/dev/qlxgb/qla_os.c +++ b/sys/dev/qlxgb/qla_os.c @@ -663,9 +663,6 @@ qla_init_ifnet(device_t dev, qla_host_t *ha) ifp = ha->ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) - panic("%s: cannot if_alloc()\n", device_get_nameunit(dev)); - if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_mtu = ETHERMTU; |