From nobody Mon Sep 30 04:45:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mS09Chz5XjvF; Mon, 30 Sep 2024 04:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mR2MqGz4FF7; Mon, 30 Sep 2024 04:45:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8/OtnNRpB2UM+DD8jthVxslNhmAb7MK+TYSxaT3+W5w=; b=vLOVB90iSyM5Px65rGdDF348eQb/xHUtZ3XH7NFjDMCp7ytye0JvZIKyJR0g6KEFAcvpI1 zWsohY9FexevhchEYaMxrA4zO+K4XUwyQIEOwi5zStfh0cme6ns5mQF7KguC7KU0WmZ0vl /tu6TzhgnavGuHDpo4mRTpBbcJrwUxSApebI5+VJbuJu3WyvkcLVgXXBhgb329bgmlvpAl djRAIPh/Y/eRc5EBl7jQv2/3lvhPNnaJyur8rDECMAS5gr7wUC56k9aKIYolmXHvug82mz 3eUlAa2ihxAEJTIMmDMwepwjXIvmQ+Sq8/0Xe+C28KeWdu8Wjzb+Zs51+AqmpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8/OtnNRpB2UM+DD8jthVxslNhmAb7MK+TYSxaT3+W5w=; b=GksTMnZFikw32af4grEcTT1y3ClTlE5Rz+l0s10W/UJA962z61BG2Jk9ZFrAwu5I8Mj8zb 18xt5+6piU6T0mzYYHoMfxeWLsDgB6gB3EsfMqVsSzGq70Xty9R610tsqUTyYHfyrDOVyy tm7nrt0yGZfzfnR3dzaordSQOlVcadAPgefMuiUQTxKWbrspMP1uPUgaFAw//eRu/xnLyZ H7pYA1Rae/nLS3i4TR5QZ7P6MvWCBXimVf+AG32AmG1kymsPFtLE+YVVTqGwLsz3yBVGA5 BN13jCRwv6IN8xb5JY7PvbV9jCadA1zxWKheMz0MUH2u4tZ7hfxtNYYiMEF+qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671527; a=rsa-sha256; cv=none; b=U/NldJzK7T1QkFkjiIpGtPWzHECtvwszxpdG1+f8v0GN1b27N9Zym9oorDzYc4Xc7yBfe+ 5//jBJY08D08j2g6G359rmPAGI2rzYCrsn+amgkP5TKn/haQpVBO3RLlzFYIgwxtCZGhK7 F4iP9khm7s3YN+slGV7CMnEjkiRGR43XRUWW5qVpNr/4zROmaOYhxF93A/yp3OQJtSX34b bL2g0Ri8QLFmTakcO58msVyfISemTMkLrDXePh1IaYwcqVsnxLRzsY+db70wC5hQ1oXGxR Ar4XYQdixFLzKZ33Ji6ukDspKj0Pc7GCvbxMhnnFulOrOCuvLD5/d0f5tHiy4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mR1qY0zf9S; Mon, 30 Sep 2024 04:45:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48U4jR24087025; Mon, 30 Sep 2024 04:45:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jRve087022; Mon, 30 Sep 2024 04:45:27 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:27 GMT Message-Id: <202409300445.48U4jRve087022@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: e763c326fc85 - stable/14 - bnxt(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e763c326fc85c0d8b3e86d954339aa847f13a934 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e763c326fc85c0d8b3e86d954339aa847f13a934 commit e763c326fc85c0d8b3e86d954339aa847f13a934 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:25 +0000 Commit: Zhenlei Huang 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"