Date: Mon, 30 Sep 2024 04:45:46 GMT From: Zhenlei Huang <zlei@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 3e51da349563 - stable/14 - mrsas(4): Stop checking for failures from malloc(M_WAITOK) Message-ID: <202409300445.48U4jk7B087895@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=3e51da34956345ca736944c8a296bb9103a01c6c commit 3e51da34956345ca736944c8a296bb9103a01c6c Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-09-03 10:25:32 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-09-30 04:44:25 +0000 mrsas(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit a38d9ad473123dca86108651ba10740055720777) --- sys/dev/mrsas/mrsas_ioctl.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/sys/dev/mrsas/mrsas_ioctl.c b/sys/dev/mrsas/mrsas_ioctl.c index 74eacfbeb9fa..8a85544604a4 100644 --- a/sys/dev/mrsas/mrsas_ioctl.c +++ b/sys/dev/mrsas/mrsas_ioctl.c @@ -462,13 +462,6 @@ mrsas_user_command(struct mrsas_softc *sc, struct mfi_ioc_passthru *ioc) kern_sge[0].length = 0; } else { ioctl_temp_data_mem = malloc(ioc->buf_size, M_MRSAS, M_WAITOK); - if (ioctl_temp_data_mem == NULL) { - device_printf(sc->mrsas_dev, "Could not allocate " - "%d memory for temporary passthrough ioctl\n", - ioc->buf_size); - ret = ENOMEM; - goto out; - } /* Copy in data from user space */ ret = copyin(ioc->buf, ioctl_temp_data_mem, ioc->buf_size); @@ -483,12 +476,6 @@ mrsas_user_command(struct mrsas_softc *sc, struct mfi_ioc_passthru *ioc) */ passcmd = malloc(sizeof(struct mrsas_passthru_cmd), M_MRSAS, M_WAITOK); - if (passcmd == NULL) { - device_printf(sc->mrsas_dev, "Could not allocate " - "memory for temporary passthrough cb struct\n"); - ret = ENOMEM; - goto out; - } passcmd->complete = 0; passcmd->sc = sc; passcmd->cmd = cmd;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409300445.48U4jk7B087895>