From nobody Mon Sep 30 05:08:18 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 4XH8Gp4p8Rz5XlrN; Mon, 30 Sep 2024 05:08:18 +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 4XH8Gp1YFjz4Wxk; Mon, 30 Sep 2024 05:08:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672898; 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=S8+wSQbz+PKzgQXggaJkeuc3TtWniwFbOfjN+ghuYQw=; b=VCfYDki/SdCQrWD79m4kh4oazsg9I+5mw5iDu4J3yM5T4fJ6OS2yZyUd5AuttKomU/nfkb hglSNfAqvCyVysaqg61mLfZSGcRURvglxA31HueyLwX/bxNC1eZmb8BIkJ6fHHbycKjXcA +hcudIZdsn0Ey8SGtBKfEiGm/1fCAterw6aW8mDCRSePrOnf+n4oXLOP4f7NWtNoYI4O58 cckpT4yXQoQ7csLSwZK4w6FRWd8NAbb150DSPoxmpEVowHa4Jr9R9Z3Gtf5MdyKgzljdyW TipCVbG7EVfT3MIWBOeHrvbr2YrH8QAPgrbeTA+ntD3lBtb2/y2kRcfjjh22WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672898; 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=S8+wSQbz+PKzgQXggaJkeuc3TtWniwFbOfjN+ghuYQw=; b=G7QkvuvPyZJsRcBDc96bnOABk/l31xMKpwciM15j0DxC9CYO6jgtbo2dQ8ie90k5hw4MSa YZWbc7+ODqckY5R6ci+lsr6rugAdHY7vOD7Wk4aWvrFgjerQZNM3rlbcWcEJ5xLg4UjPfo aUIxk555jqnzbMLl+9Fe10PRflG5uu/Ce0xVGaZnM/YviGqO8wB+KpP+nZmbcmsQJu5ugi kaucg2klbA4oVaRTCVUmMnatYTz9x39A1OQrUsqseCrO3K3c6a4u0cb5wW8698E+k5fb/Z XJBH67a+Pnci6bFoDK7ip84Or8bnb4/zcenGta2HAOl3L/nV5aBZ8snE0w9MPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672898; a=rsa-sha256; cv=none; b=GX4l3l9YruvMdGTbBogw/lX6A/xO56IyzwcF1x7bJkxKJD5GU5DLntoUmXujE2iPehckYE rX40fDO8taNc93t02eTRFBAaVjnV9lam4rdEilQ2AbCxJo9ZWNfwf+Qk7x9rGofEcJbIPt FL8CqQJ2e5R37UlndJ5rl5Ti3cm5uf/i7YMtV9jXoC4Gb3UH6tHAF5xFX6eGo2vz8IT4fY fPGmIO0n4vXjGSXrWTYou1Sc46dk6QwEfZaYtRdzCDTvn+40gPkk/YedVK7lDsumj1IqQ/ e1E5G/ZngkJlA7YcLdMTlsSCDIId0rxUIz8f4TNU17Ta/reBa5/cU2q7uuNyQw== 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 4XH8Gp193szgDS; Mon, 30 Sep 2024 05:08:18 +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 48U58IFS024816; Mon, 30 Sep 2024 05:08:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58IZH024813; Mon, 30 Sep 2024 05:08:18 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:18 GMT Message-Id: <202409300508.48U58IZH024813@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: 783ec23313de - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 783ec23313de492b7fd6bdcf58c6af9aa3a10163 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=783ec23313de492b7fd6bdcf58c6af9aa3a10163 commit 783ec23313de492b7fd6bdcf58c6af9aa3a10163 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:25 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:34 +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) (cherry picked from commit e763c326fc85c0d8b3e86d954339aa847f13a934) --- sys/dev/bnxt/bnxt_mgmt.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/sys/dev/bnxt/bnxt_mgmt.c b/sys/dev/bnxt/bnxt_mgmt.c index d54d7a2a2fe1..6ec47e2c1191 100644 --- a/sys/dev/bnxt/bnxt_mgmt.c +++ b/sys/dev/bnxt/bnxt_mgmt.c @@ -141,19 +141,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", @@ -173,12 +161,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"