From nobody Tue Sep  3 10:26:54 2024
X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wyhcv1vYQz5MkLc;
	Tue, 03 Sep 2024 10:26:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4Wyhct6RL1z4rys;
	Tue,  3 Sep 2024 10:26:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1725359214;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KovJX751ir8Agnl2AB4hfK3sJw2pC86gINKMyV5DjiE=;
	b=r+0fxYyGpPOhbbZBiqUPUDb5KHXQ1t1joqEYkO3FY/GyV3q0NviNSw0k3R3V/suT/fCqqD
	Bcd6i3Khbg39Hf/tTn6Klx8YvxrQ2Ar7rmR3XyHu2BZM6EJWd9aHxPXApTM0jEOd6ym1l8
	HGNN/dRtZq/MMCpOl7WGPUztJ8OiDA5N/uN6jEp/NxlUmeXOGdo9tLjtVMIGDwqJIEkZy0
	C1K5nwNpoRBhV3umlPyPQrHp90PSHHKK7zxov9N4xwpq42WF042OXzUxZgyJ2D8+AiiR7X
	xIZWVhiQhp+Ua61Gweg7GI1yb3aU8MTqlh8kBp4aM6Y57VWezh/r9xVb3ad28A==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725359214; a=rsa-sha256; cv=none;
	b=RYEV3qISgRm3Jz4rgC6NOC+D7V//Ir8KCD+msaEpRyQWJz6absBU0HMRQ1p6odkNMr9Dis
	nd7NNq83tJB7mqo0B28md1oLYqxjAU95BiKcbPLtDA+QRgM40bFRx0vZaBKgB+fPLQAxZP
	vdMVZCiL55CxhbUHC1dNvmJXV3MeHB6Fs/ey1fQluD3derslVkRi3cH7xm4At7vWNyAyNJ
	1RTjtPtJneYtuJ1+f5Oaytpm8SdGkzh4UdxUyc2E9y0iRWxlU4DWkedqoSDPzCheXREBTD
	jfHVVstp3MdNUtAS8iqweYbHLNy72za5dd0tlEf37PatihMBgkmUwPOyKBi+EA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1725359214;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KovJX751ir8Agnl2AB4hfK3sJw2pC86gINKMyV5DjiE=;
	b=vta01l18GObNynlCTAPwtlYqex4kL+GqnNMJRL4d77AZzj+aeMpRXcE7U/DFL1raDl7m01
	xkxnS++LyJBDaTVh1VMxE87i8qBuvAht8R5l80lPM4nw8M3NnR4kQ1ZJyBkJ4gLaxptHWR
	FaCLA/fuawsX2q4b5RbC9wmIuqiGAmw5vF1HIofLn2/GiK/ttDHo0NtBhfW+UTPzNBdeyu
	F4JAd37VTWeXrmkFYpZ+xR0wWqFm1grqZOtx+NYefatKKXO1sEdOz7j7/zXqEd0HxcciQv
	OVuMIUYasDJYc8VhJY3AnsKmrK0ddPN08s9XVkhMUgAa8+pgdMOGqoDyG8UD7Q==
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Wyhct5gmyzcFc;
	Tue,  3 Sep 2024 10:26:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 483AQsdb009220;
	Tue, 3 Sep 2024 10:26:54 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 483AQsha009217;
	Tue, 3 Sep 2024 10:26:54 GMT
	(envelope-from git)
Date: Tue, 3 Sep 2024 10:26:54 GMT
Message-Id: <202409031026.483AQsha009217@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-main@FreeBSD.org
From: Zhenlei Huang <zlei@FreeBSD.org>
Subject: git: 7bcb1228558b - main - LinuxKPI: 802.11: Stop checking
  for failures from malloc(M_WAITOK)
List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main
List-Help: <mailto:dev-commits-src-main+help@freebsd.org>
List-Post: <mailto:dev-commits-src-main@freebsd.org>
List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org>
List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org>
X-BeenThere: dev-commits-src-main@freebsd.org
Sender: owner-dev-commits-src-main@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 7bcb1228558b4325fab39616e2e3b2573a9e7da6
Auto-Submitted: auto-generated

The branch main has been updated by zlei:

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

commit 7bcb1228558b4325fab39616e2e3b2573a9e7da6
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-09-03 10:25:21 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-09-03 10:25:21 +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
---
 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 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();