Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3925351pxj; Mon, 21 Jun 2021 09:30:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIUPAOMf+oNLmDcpfOaslQ1eZjbGgU/8QNbFe7Us/pQRiqCPxyUuPt1FiXX6pjSuoJXAxk X-Received: by 2002:a92:2c02:: with SMTP id t2mr18387492ile.233.1624293020207; Mon, 21 Jun 2021 09:30:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293020; cv=none; d=google.com; s=arc-20160816; b=c9pGiUpJ5w3lOPLmyIUfmXoCnr5M8XQXU7Vd8FcObdHkUhWccgmskol3vth/NRs40X q8Wu78WD5ooPI3WMhV5dfrQwbJDF6h37EJVL0JYi3kTlG0q7I6U4q5ybPz1uPWMEHfac HmtrefKBI0I8DAi+EfHHhrl9roZZnbE9MLZV8BDfcLhmL1hhd/TtpnMyefcRtNktISFg 2j98Rl+4eC9DmIySGX59RlMIAxH5EjX82Jldk5VeAjrU+7X2UobtZh5IyqEIm2azQOKq sfdSjapzTH7Z43gY85x9Ngyoq7OwgFD4CvhT0ekm+6hz0VAxc6gIIL3nY7zDlPjgE3oa 1a1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SS15XhZwemy7HtlAnEjY/qpdFPv8T5UcMDAAASAgUXw=; b=CHhFM0fpXY0EqoPDJh84YPMKUDRlt65/xmQKgHkidxDSeKUUfrbRQ/JShUsZ5e40js DLGdigc9ufqiDWn7rAJUUOyJ6NaIOG+e8VHjco7yEOxP50kZfDsmUjz9zqYDcQBBnC8Q GE+ZSFawQoOax/A6+WJ6xWcHXl/cI2PvyetZHyj69plVtfJdMzTp0GY3t1hxmp79KdBi kWGeelfc9SYgwE1OwjUjTHK3nYzYnKMK0ygho0IpMn9nczy1J/w7DbTOGFU4kbQ2xVj1 HmCA6YNzwObiMOep0zpr4B0Pso3N7xH9ip8KC97hRrHJ3nOZ3jI5HywsBe0nGV9zvq3r 0pwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iD5qqefC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k6si983775ilu.56.2021.06.21.09.30.07; Mon, 21 Jun 2021 09:30:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iD5qqefC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232244AbhFUQat (ORCPT + 99 others); Mon, 21 Jun 2021 12:30:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:49624 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231667AbhFUQ2w (ORCPT ); Mon, 21 Jun 2021 12:28:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EFE1761261; Mon, 21 Jun 2021 16:23:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292630; bh=QPADqRXbxHopf+2H6Gd2OsBm/3XGJ3auzrYB6ovQafw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iD5qqefCkq/lIP/iXsTsYPXHBuaIj9kJe1emXJ6H4D3a5YKb8qEBnkU1EhjlKnvrm RS5iyyYqE4oDhJKl2kr7rwE3TflPyx5cw+/2vcXQPh2yOzQSEwrAn72PwYHsUrmhcE KKX50lY2HC5brcjJX1g5e7XreMaAfHFVNQL+lgXk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Somnath Kotur , Michael Chan , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 071/146] bnxt_en: Call bnxt_ethtool_free() in bnxt_init_one() error path Date: Mon, 21 Jun 2021 18:15:01 +0200 Message-Id: <20210621154915.355494232@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Somnath Kotur [ Upstream commit 03400aaa69f916a376e11526cf591901a96a3a5c ] bnxt_ethtool_init() may have allocated some memory and we need to call bnxt_ethtool_free() to properly unwind if bnxt_init_one() fails. Fixes: 7c3809181468 ("bnxt_en: Refactor bnxt_init_one() and turn on TPA support on 57500 chips.") Signed-off-by: Somnath Kotur Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 3f3d13a18992..db1b89f57079 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -12746,6 +12746,7 @@ init_err_pci_clean: bnxt_hwrm_func_drv_unrgtr(bp); bnxt_free_hwrm_short_cmd_req(bp); bnxt_free_hwrm_resources(bp); + bnxt_ethtool_free(bp); kfree(bp->fw_health); bp->fw_health = NULL; bnxt_cleanup_pci(bp); -- 2.30.2