Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Sep 2024 10:27:10 GMT
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 51971340bd3f - main - ena(4): Stop checking for failures from malloc(M_WAITOK)
Message-ID:  <202409031027.483ARA3t009920@gitrepo.freebsd.org>

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

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

commit 51971340bd3ff41591adbbfca68e9e753f6eb135
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

    ena(4): Stop checking for failures from malloc(M_WAITOK)
    
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D45852
---
 sys/dev/ena/ena_rss.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sys/dev/ena/ena_rss.c b/sys/dev/ena/ena_rss.c
index d90a7fbb253a..41fa9c62f94a 100644
--- a/sys/dev/ena/ena_rss.c
+++ b/sys/dev/ena/ena_rss.c
@@ -279,12 +279,9 @@ ena_rss_indir_init(struct ena_adapter *adapter)
 	struct ena_indir *indir = adapter->rss_indir;
 	int rc;
 
-	if (indir == NULL) {
+	if (indir == NULL)
 		adapter->rss_indir = indir = malloc(sizeof(struct ena_indir),
 		    M_DEVBUF, M_WAITOK | M_ZERO);
-		if (indir == NULL)
-			return (ENOMEM);
-	}
 
 	rc = ena_rss_indir_get(adapter, indir->table);
 	if (rc != 0) {



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