Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Sep 2024 05:08:07 GMT
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: ebf9b28b19e2 - stable/13 - LinuxKPI: 802.11: Stop checking for failures from malloc(M_WAITOK)
Message-ID:  <202409300508.48U5871o024353@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=ebf9b28b19e2f5832d954861efba5362b0f38d09

commit ebf9b28b19e2f5832d954861efba5362b0f38d09
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-09-03 10:25:21 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-09-30 05:05:31 +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)
    (cherry picked from commit 7bea79c1ab400fc223d730a89af97dcf4ba09911)
---
 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 a33149353c75..288ae00b6949 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -4372,8 +4372,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;
@@ -4425,10 +4423,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();
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409300508.48U5871o024353>