Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp401905pxu; Tue, 1 Dec 2020 14:20:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcNyIvSTEgyR1isXwSti5+Vof1FDI7Shpi25gc2CqCUqZoL7jU+xzWz7utR2/UojiMVYP5 X-Received: by 2002:a05:6402:cbb:: with SMTP id cn27mr5260452edb.275.1606861228714; Tue, 01 Dec 2020 14:20:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606861228; cv=none; d=google.com; s=arc-20160816; b=xvweS6Kw7hv6xzmJ6SpbUw3YvemsxXQgov4XO0c4W4E3QAxRVw3WDuK2Ib2fDXUpy3 VKPSM5Lg9/ytPwgzkxoXMqhCGhG4scer8ZcTlokIajZuTWWfV3dXmcargS8bBhTAx9os idbtQ37F0+ySADSBhzLuPh/O+HmuBp8EWpRbD3/b4avJez3eYCS1JhTivXAMt8zoczYS p5v92cg1ntpgOHydSYJ2nZNdm5U1bH0Jp7ZVwvTLSsx4oDQXMQLqAo3HFZVwhzEx/+hQ I/d6RONMHfiJosomTkMp1Enfr8grz5m4s8ikWlNqh5vz3spWAEGD4qoQNH2GPrBuTXul ixTg== 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=MG3mao4KMr/veEm26kIK2LZ4t1M8iJ/J0MsJmGSkd7o=; b=QZ56nekrN/bVxiBoFBb+tYajxG3Ut0pleTemQWwuV+g5WFLf5+CkW14S4/nTUyiwOc rnWcVGKBYfQdd3GuZ/wMmtenONinfcA+pgVXxhKBeM6LzfE/MfD1qylv+57LGO582F/Q WnwyzLoJe+U/eZRZZ6SS2g1Nk+0wzqpTyNyrb0jhbXv8QxNeGa6Alm/g1lAyWxSb2Hu2 LaeK3BvddJ6NrShvckhO4DetVbKtKuvj4bHUSGYVEoRfslZyY2xy/1DXTzKsM4KqFhbq r30/TSz8ej1XkvYoNY4rvSPWR40z+uZt+mEvZcUGKnkr9JSQF/YSyMz20GWv6vWfxR+g lnCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vTzQwfV5; 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 r17si826208edq.47.2020.12.01.14.20.06; Tue, 01 Dec 2020 14:20:28 -0800 (PST) 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=vTzQwfV5; 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 S1729246AbgLAI5Y (ORCPT + 99 others); Tue, 1 Dec 2020 03:57:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:58602 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728761AbgLAI5W (ORCPT ); Tue, 1 Dec 2020 03:57:22 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 07FA021D7F; Tue, 1 Dec 2020 08:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606813026; bh=dNiUw8aZgHZVpA2DOmtgHYgW8HQdUWCqAFVDwgrpOz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vTzQwfV51Eql/0WwEdf7zIkiJ2Pwgibqvn+fCrc/eIqFzVHwYXsIhMsc0XGJqTNIB vx4OY/0dcfVJFFFJKuxMcGHFsRayCenotX/WfRcvqwkDZfOc7Zu/IcxGEMbrtvgHLl HGpOpmwuZTrFQbX6RyFf3MU/qNLnfr3pii0L61X4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jakub Kicinski , Michael Chan , Sasha Levin Subject: [PATCH 4.9 26/42] bnxt_en: Release PCI regions when DMA mask setup fails during probe. Date: Tue, 1 Dec 2020 09:53:24 +0100 Message-Id: <20201201084644.177374528@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201084642.194933793@linuxfoundation.org> References: <20201201084642.194933793@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: Michael Chan [ Upstream commit c54bc3ced5106663c2f2b44071800621f505b00e ] Jump to init_err_release to cleanup. bnxt_unmap_bars() will also be called but it will do nothing if the BARs are not mapped yet. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Reported-by: Jakub Kicinski Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/1605858271-8209-1-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 63c043e8824fc..f9610f860e6d1 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -6320,7 +6320,7 @@ static int bnxt_init_board(struct pci_dev *pdev, struct net_device *dev) dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)) != 0) { dev_err(&pdev->dev, "System does not support DMA, aborting\n"); rc = -EIO; - goto init_err_disable; + goto init_err_release; } pci_set_master(pdev); -- 2.27.0