aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenlei Huang <zlei@FreeBSD.org>2024-09-03 10:25:21 +0000
committerZhenlei Huang <zlei@FreeBSD.org>2024-09-30 04:44:17 +0000
commit905d5420ee1eced55f99ab3ba5c340b685f2f896 (patch)
treeb79b86d9937dd6a5f470eaa15859958d7126a24a
parent7bea79c1ab400fc223d730a89af97dcf4ba09911 (diff)
downloadsrc-905d5420ee1eced55f99ab3ba5c340b685f2f896.tar.gz
src-905d5420ee1eced55f99ab3ba5c340b685f2f896.zip
krping: Stop checking for failures from malloc(M_WAITOK)
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 66c35a6675ff987b52a2018871231658b1980a6c)
-rw-r--r--sys/contrib/rdma/krping/krping_dev.c7
1 files changed, 1 insertions, 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);