Date: Tue, 3 Sep 2024 10:27:25 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: a38d9ad47312 - main - mrsas(4): Stop checking for failures from malloc(M_WAITOK) Message-ID: <202409031027.483ARP2p010604@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=a38d9ad473123dca86108651ba10740055720777 commit a38d9ad473123dca86108651ba10740055720777 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-09-03 10:25:32 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-09-03 10:25:32 +0000 mrsas(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 --- 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?202409031027.483ARP2p010604>