git: 51971340bd3f - main - ena(4): Stop checking for failures from malloc(M_WAITOK)

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Tue, 03 Sep 2024 10:27:10 UTC
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) {