git: 955b380365af - main - cxgbe(4): Stop checking for failures from malloc/mb_alloc_ext_pgs(M_WAITOK)

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Tue, 03 Sep 2024 10:27:08 UTC
The branch main has been updated by zlei:

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

commit 955b380365af174b3d35905b7b8afae97506a0bd
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-09-03 10:25:26 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-09-03 10:25:26 +0000

    cxgbe(4): Stop checking for failures from malloc/mb_alloc_ext_pgs(M_WAITOK)
    
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D45852
---
 sys/dev/cxgbe/cxgbei/cxgbei.c | 3 ---
 sys/dev/cxgbe/tom/t4_cpl_io.c | 5 -----
 2 files changed, 8 deletions(-)

diff --git a/sys/dev/cxgbe/cxgbei/cxgbei.c b/sys/dev/cxgbe/cxgbei/cxgbei.c
index 04454a98e247..ccca45f5f761 100644
--- a/sys/dev/cxgbe/cxgbei/cxgbei.c
+++ b/sys/dev/cxgbe/cxgbei/cxgbei.c
@@ -842,9 +842,6 @@ cxgbei_activate(struct adapter *sc)
 
 	/* per-adapter softc for iSCSI */
 	ci = malloc(sizeof(*ci), M_CXGBE, M_ZERO | M_WAITOK);
-	if (ci == NULL)
-		return (ENOMEM);
-
 	rc = cxgbei_init(sc, ci);
 	if (rc != 0) {
 		free(ci, M_CXGBE);
diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c
index cb229d327386..0a40bbda3f3f 100644
--- a/sys/dev/cxgbe/tom/t4_cpl_io.c
+++ b/sys/dev/cxgbe/tom/t4_cpl_io.c
@@ -2127,11 +2127,6 @@ alloc_aiotx_mbuf(struct kaiocb *job, int len)
 			break;
 
 		m = mb_alloc_ext_pgs(M_WAITOK, aiotx_free_pgs);
-		if (m == NULL) {
-			vm_page_unhold_pages(pgs, npages);
-			break;
-		}
-
 		m->m_epg_1st_off = pgoff;
 		m->m_epg_npgs = npages;
 		if (npages == 1) {