From nobody Tue Sep 03 10:27:06 2024 X-Original-To: dev-commits-src-main@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 4Wyhd66jc4z5MkYt; Tue, 03 Sep 2024 10:27:06 +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 4Wyhd62VkYz4sPp; Tue, 3 Sep 2024 10:27:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725359226; 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=TlSiW4OB6Wh1wa/6DypqGKEHReHAqX3DOQsmjJnXDyc=; b=MxKGiSbQ6SvybPGM5c00A8maGRrPtWS6htIkFOtI32a6Q6n1Q0bpoldVftlhZ2APFYv3io KVhsOmtUG5o90D8QE4iSSUhRC5wVqX13DFD7XX3VhPm+n34z59kaxmuTBCXruGdITxELE5 1m6TdkTgdELO0gKaV5IGIBFE9rTW/GarAE71yy0gdxxzTL7WXnVByJhEiasUlmqYH8I5Ap 1gYZBhSbVJdOzhEbAX51oseyqyfDlS8sjSmPzJSr471GFeEX/MxgxZSYqXJduKUSHm7bny ujulbxvNpU9ICW2a91+cOFOZcoKwPsyJH1qrcgSyRHIxl9GoJ8zgxIjlzQVqfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725359226; a=rsa-sha256; cv=none; b=XaBXGv3TeO33CaXcFgIFjfVHecMzx6kgjHqQnJndwuTTlkYezsTf3wNg9UV7LcGvYHml2t FZFtak/xx39iZotFWh1c2ozyblLrQ0HS0wnpej1LaRJzRQsNUQoeinnfdAYTkdbB3hha+o bTdi5/miBlMSjpoVSunjpBkpJcwiqHBhHcrBlEbRhTQjI0N8wNJKVLpQ5wjXDjnr/7W8lV 3OrAmlGoXVqXDWk8IKzvq2wOGW9HnEr1NGyHv2E5SpgugT6v9EPyJsrrFOZL1V50XQPQ7o vGEQ7W1ttiMQLe70F3zKwesQmYUSDuVNkIQ5qnFTt7MMD30xoh+y32Ut8Z1yxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725359226; 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=TlSiW4OB6Wh1wa/6DypqGKEHReHAqX3DOQsmjJnXDyc=; b=fslX2D7ZGkbKDeNQYgaaMTPXyt5z3PZi6A+ghnWulLxmg2gf+jxuTbANsIA3LEDxlPx0t3 9bPrwN2J9+1IXneuyGGils0F6VKOT9WmaAsrilupDRHzevNTV1PQpN4Bdyivrtjq+1n6Yd V5ipzOwFPS9wDsfzA0iADsE1RHaOwTGOii57qhtvp9yaj/VdztE5Xp7yzy8vTqw/1W6fdO hsJ//lynTj3o36nU9euPEpYeWVJENqoGzTvweIbWhzusVMsH8LxFbJWnTmUw219vLVtAlm KKV6qVtq5dEFruAw/zR6pI+QAL+uOG24OvcR98nd8s66sOCxI+Mk0sp7/3j+6w== 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 4Wyhd61PsJzcnG; Tue, 3 Sep 2024 10:27:06 +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 483AR6JZ009731; Tue, 3 Sep 2024 10:27:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 483AR6Go009728; Tue, 3 Sep 2024 10:27:06 GMT (envelope-from git) Date: Tue, 3 Sep 2024 10:27:06 GMT Message-Id: <202409031027.483AR6Go009728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: dcd387aaa5d4 - main - bnxt(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: dcd387aaa5d4409a7e99376e0254029fce1a48a8 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=dcd387aaa5d4409a7e99376e0254029fce1a48a8 commit dcd387aaa5d4409a7e99376e0254029fce1a48a8 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:25 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-03 10:25:25 +0000 bnxt(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 --- 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"