git: 7bea79c1ab40 - stable/14 - LinuxKPI: 802.11: Stop checking for failures from malloc(M_WAITOK)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 30 Sep 2024 04:45:15 UTC
The branch stable/14 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=7bea79c1ab400fc223d730a89af97dcf4ba09911
commit 7bea79c1ab400fc223d730a89af97dcf4ba09911
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-09-03 10:25:21 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-09-30 04:44:17 +0000
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)
---
sys/compat/linuxkpi/common/src/linux_80211.c | 6 ------
1 file changed, 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();