diff options
author | Zhenlei Huang <zlei@FreeBSD.org> | 2024-09-03 10:25:21 +0000 |
---|---|---|
committer | Zhenlei Huang <zlei@FreeBSD.org> | 2024-09-03 10:25:21 +0000 |
commit | 7bcb1228558b4325fab39616e2e3b2573a9e7da6 (patch) | |
tree | 58049d11a313286d1212fa565b406f25622b7778 /sys/compat/linuxkpi/common | |
parent | 7a720bf67d73ba565a0a1130065f798870eb5faa (diff) | |
download | src-7bcb1228558b4325fab39616e2e3b2573a9e7da6.tar.gz src-7bcb1228558b4325fab39616e2e3b2573a9e7da6.zip |
LinuxKPI: 802.11: Stop checking for failures from malloc(M_WAITOK)
As a consequence lkpi_ieee80211_ifalloc() now does not fail. Remove
unneeded NULL check.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45852
Diffstat (limited to 'sys/compat/linuxkpi/common')
-rw-r--r-- | sys/compat/linuxkpi/common/src/linux_80211.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index b46e56133725..a2791d20a727 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4401,8 +4401,6 @@ lkpi_ieee80211_ifalloc(void) struct ieee80211com *ic; ic = malloc(sizeof(*ic), M_LKPI80211, M_WAITOK | M_ZERO); - if (ic == NULL) - return (NULL); /* Setting these happens later when we have device information. */ ic->ic_softc = NULL; @@ -4454,10 +4452,6 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops) /* BSD Specific. */ lhw->ic = lkpi_ieee80211_ifalloc(); - if (lhw->ic == NULL) { - ieee80211_free_hw(hw); - return (NULL); - } IMPROVE(); |