diff options
| author | Zhenlei Huang <zlei@FreeBSD.org> | 2024-09-03 10:25:21 +0000 |
|---|---|---|
| committer | Zhenlei Huang <zlei@FreeBSD.org> | 2024-09-30 04:44:17 +0000 |
| commit | 7bea79c1ab400fc223d730a89af97dcf4ba09911 (patch) | |
| tree | 46a4a87adc15685164cb7bd60dd64a81e3ccbbac | |
| parent | 3d5e539b1f43dec0abd2df61cb958550ef9606a0 (diff) | |
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
(cherry picked from commit 7bcb1228558b4325fab39616e2e3b2573a9e7da6)
| -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 a4b5545e0c3c..34e40b961bed 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4402,8 +4402,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; @@ -4455,10 +4453,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(); |
