git: 66c35a6675ff - main - krping: Stop checking for failures from malloc(M_WAITOK)

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

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

commit 66c35a6675ff987b52a2018871231658b1980a6c
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

    krping: Stop checking for failures from malloc(M_WAITOK)
    
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D45852
---
 sys/contrib/rdma/krping/krping_dev.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/sys/contrib/rdma/krping/krping_dev.c b/sys/contrib/rdma/krping/krping_dev.c
index eea3c772ea4f..59aa19672443 100644
--- a/sys/contrib/rdma/krping/krping_dev.c
+++ b/sys/contrib/rdma/krping/krping_dev.c
@@ -174,12 +174,7 @@ krping_write(struct cdev *dev, struct uio *uio, int ioflag)
 	char *cp;
 	krping_t *krpingmsg;
 
-	krpingmsg = malloc(sizeof *krpingmsg, M_DEVBUF, M_WAITOK|M_ZERO);
-	if (!krpingmsg) {
-		uprintf("Could not malloc mem!\n");
-		return ENOMEM;
-	}
-
+	krpingmsg = malloc(sizeof *krpingmsg, M_DEVBUF, M_WAITOK | M_ZERO);
 	cp = krpingmsg->msg;
 	while (uio->uio_resid) {
 		amt = MIN(uio->uio_resid, remain);