From nobody Sat Feb 7 08:59:14 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52D7EC4332F for ; Mon, 23 May 2022 17:28:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241141AbiEWR0V (ORCPT ); Mon, 23 May 2022 13:26:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240497AbiEWRQX (ORCPT ); Mon, 23 May 2022 13:16:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 006F670905; Mon, 23 May 2022 10:14:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 28CB7614EB; Mon, 23 May 2022 17:13:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E9DFC385A9; Mon, 23 May 2022 17:13:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653325982; bh=U3MCaPU4KcqqPQx9TyAhzv+aeX5+rNSIakb60lLPjGQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wP8DzkCkWTJ6gOeU2FoUzycrAYAgMuyqlXetZbMqbIBfiWdwKDa0kUI2mzUVtU4x8 k2lIgUnK4U/jlx15Dd/AxaouVTdEQEovh1BO+Ur5uHrHEWm9dftRam+W5g9lmuqEBa LD4rJP/1izq3657Kh61xaPS91nWGJqxTF6RuSFDE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Yang Yingliang , Jakub Kicinski , Sasha Levin Subject: [PATCH 4.19 40/44] net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe() Date: Mon, 23 May 2022 19:05:24 +0200 Message-Id: <20220523165800.666405391@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165752.797318097@linuxfoundation.org> References: <20220523165752.797318097@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yang Yingliang [ Upstream commit 0807ce0b010418a191e0e4009803b2d74c3245d5 ] Switch to using pcim_enable_device() to avoid missing pci_disable_device(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220510031316.1780409-1-yangyingliang@huaw= ei.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net= /ethernet/stmicro/stmmac/stmmac_pci.c index cc1e887e47b5..3dec109251ad 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c @@ -261,7 +261,7 @@ static int stmmac_pci_probe(struct pci_dev *pdev, return -ENOMEM; =20 /* Enable pci device */ - ret =3D pci_enable_device(pdev); + ret =3D pcim_enable_device(pdev); if (ret) { dev_err(&pdev->dev, "%s: ERROR: failed to enable device\n", __func__); @@ -313,8 +313,6 @@ static void stmmac_pci_remove(struct pci_dev *pdev) pcim_iounmap_regions(pdev, BIT(i)); break; } - - pci_disable_device(pdev); } =20 static int __maybe_unused stmmac_pci_suspend(struct device *dev) --=20 2.35.1