Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2108758ioo; Mon, 23 May 2022 10:14:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZkkEMlC9PnlHO2hWHY82Q4oLxa9SMJ+/hoHD2HNbVW2EZSaNPQTNgzsNWv5QgFP5kkdqa X-Received: by 2002:a65:6c12:0:b0:3db:8148:308b with SMTP id y18-20020a656c12000000b003db8148308bmr21318601pgu.103.1653326047121; Mon, 23 May 2022 10:14:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653326047; cv=none; d=google.com; s=arc-20160816; b=mTyC5kEK5jAPIlUQXx+Q6CKQlYaRP4vmu/WMW8y5UyB/FSZQJxYa9AEGwkPaYrLKwg NVZG/9tXm0L5Gy2cvHMPgkoxOZ34ZKbWsROzhqDfsQk942SYPjF+7+IEfDjqcObRWNwA u9me/GRRczq42eYBSVEjE41AJXoFpJJDo+aksYmlvS6bq9H2XjGDjJFwZDXnIR/o8hmk qlTSxOX+2HBMBFlShnhtdCoI/OUWyUv8Fs3bsNtZvHCChGPPUHC+xuhR1gPQGwLqk0io bUHJISXcmJh1T81j5rUed3H8ERDQihf/FX9rs0coKCl2BNLTqiRuEmMB5Xm79872gQvQ w/Jg== 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=Q2YrZ8Qv9Q8FffdgXfd/452gkVOZXmTv/9YDTb0zc9s=; b=hRG6AeRSFOMJ9tiEdFfyHFOyaAmv9t99hcjt9OjeyX6iTYRlUDso4BOAB5QIOzxjGn 3O1jLeQBZ5gSvtvlIAZpGdPWwhZNqCjwzYDAmXup07cHveqdan/+mpP6K/NsxdgJwUhd GTyWF5rcduj9Yat0kzocj8nZu4H09hPeKrZGgUjupDG1iNuf97K3saM3UVKVcGfIPYoO 3Ee6KnfzoTNuqwEVxUPpmwMT+CiXF6HF2bi4o5fHzx2PTb8afLgpyt9FepxxugIX+MUr t6vOYfuPzh2tW+zFfmx8syl/W/beNU4SKf2d3oxMzbszNYFraOMdG+F4HQkZoNLfKpw0 XBNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pspRoPJg; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s9-20020a056a00194900b0050d20bfc382si16436882pfk.194.2022.05.23.10.14.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 10:14:07 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pspRoPJg; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 88BB86EC7D; Mon, 23 May 2022 10:13:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239967AbiEWRLa (ORCPT + 99 others); Mon, 23 May 2022 13:11:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239594AbiEWRKT (ORCPT ); Mon, 23 May 2022 13:10:19 -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 CF3A426AFD; Mon, 23 May 2022 10:09:53 -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 A3348614FD; Mon, 23 May 2022 17:09:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4884C385AA; Mon, 23 May 2022 17:09:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653325747; bh=U3MCaPU4KcqqPQx9TyAhzv+aeX5+rNSIakb60lLPjGQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pspRoPJgH/2fEzMKq7mAqs2N9LrTq4nHzuxMATX+5uiJhVf0ldHlCKsB3F7hLpL9d TMmps9kvrUd+RQ2an6+AllyxG7wAJ8z0wbRtiTudbpNp+NkXL7yA7M3RXHhGeth+As nZ7OUflxGqLm/c4kHG+37AAoAgCIkypGdUK84kLc= 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.14 30/33] net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe() Date: Mon, 23 May 2022 19:05:19 +0200 Message-Id: <20220523165753.261003039@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165746.957506211@linuxfoundation.org> References: <20220523165746.957506211@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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@huawei.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; /* Enable pci device */ - ret = pci_enable_device(pdev); + ret = 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); } static int __maybe_unused stmmac_pci_suspend(struct device *dev) -- 2.35.1