Date: Mon, 30 Sep 2024 04:45:27 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: e763c326fc85 - stable/14 - bnxt(4): Stop checking for failures from malloc(M_WAITOK) Message-ID: <202409300445.48U4jRve087022@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=e763c326fc85c0d8b3e86d954339aa847f13a934 commit e763c326fc85c0d8b3e86d954339aa847f13a934 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-09-03 10:25:25 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-09-30 04:44:20 +0000 bnxt(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit dcd387aaa5d4409a7e99376e0254029fce1a48a8) --- sys/dev/bnxt/bnxt_en/bnxt_mgmt.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c index 2f82580352cb..72704c3db452 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c @@ -205,19 +205,7 @@ bnxt_mgmt_process_hwrm(struct cdev *dev, u_long cmd, caddr_t data, } req = malloc(msg_temp.len_req, M_BNXT, M_WAITOK | M_ZERO); - if(!req) { - device_printf(softc->dev, "%s:%d Memory allocation failed", - __FUNCTION__, __LINE__); - return -ENOMEM; - } - resp = malloc(msg_temp.len_resp, M_BNXT, M_WAITOK | M_ZERO); - if(!resp) { - device_printf(softc->dev, "%s:%d Memory allocation failed", - __FUNCTION__, __LINE__); - ret = -ENOMEM; - goto end; - } if (copyin((void *)msg_temp.usr_req, req, msg_temp.len_req)) { device_printf(softc->dev, "%s:%d Failed to copy data from user\n", @@ -237,12 +225,6 @@ bnxt_mgmt_process_hwrm(struct cdev *dev, u_long cmd, caddr_t data, (num_ind * sizeof(struct dma_info)); msg2 = malloc(size, M_BNXT, M_WAITOK | M_ZERO); - if(!msg2) { - device_printf(softc->dev, "%s:%d Memory allocation failed", - __FUNCTION__, __LINE__); - ret = -ENOMEM; - goto end; - } if (copyin((void *)mgmt_req.req.hreq, msg2, size)) { device_printf(softc->dev, "%s:%d Failed to copy"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409300445.48U4jRve087022>