Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2167594rbb; Tue, 27 Feb 2024 12:52:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV+esj4iWTil3hUpYeggtC67LVL6AyXldVtL6+QjFWdLWHzB/9mi11Qgo/f8W/XPSYGnyZtWFwGs98Pby3IqzIMOp4eKM4XPlDx6fBWJQ== X-Google-Smtp-Source: AGHT+IGO9/1wfKJXyurPUDPtuH0SNmxK/AEwIYplxQibAF0Mw8S+ZKhZs4ENGaf60XcWUYil5Gsr X-Received: by 2002:a17:902:e88d:b0:1dc:abef:f153 with SMTP id w13-20020a170902e88d00b001dcabeff153mr6825027plg.2.1709067152588; Tue, 27 Feb 2024 12:52:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709067152; cv=pass; d=google.com; s=arc-20160816; b=qr6480XyTUXMTBWtABh+Dbkw4vKlRt7DK7aZVf2ooAlR4dZUtILuVoblpJJikdMlx7 NfjNhxUUfFzsgR4PFBa0y+xKxLJ+oA6rQWY/h0POwGxtjLHcn0fKCy4Dnbv+vv/uoO6M 909zdgrFzJNAkzHnEA+G7J8Q+4eRHlM/CGaFD4x4WrbvRNWKzgUTVMFp2SmSaCUts5gn hvyU8faelXwV/DlJdVYLZ7sXGnupB4VCGuEfN8oEeINVmmacYAcba9kuzwkPSUgabPQa syM1DJZBK2ogmKQyewKgSXuh7lA9Y9gtKAYi/pXiKYCDFNkcLNJprJtOYiC+v+9YALDK cy+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=+f4AbVJbx28S60iHUgdJzBPh+asTj/MtBzhNY4Ac8Mw=; fh=fy3WxJgzAvVIUuIAKsA9SqNT5iC1mOpKhMV0nRoHjUg=; b=xb1LpLX88f9VrnwT2h5o8c7sA59x2S2BpuvoKZ8EjkTyUdSVBedYttsArdRcE9iwNR 0dc7KUmEka0e7ImMValb5gUPAp3AhtAC8iGTbLqSQMTOM8572wg2i1EkH5neWtsMsZcy mq2fhTBoGHMo2DRRQiJ2UGPu7pcB1RNFNNnmMBcgTYY7RONRNndPQrn1qzjpQf84KcE3 kf9/VMrNftWd18LyJZtC84G2weO3Y032boWU+8UO08CkYafDHePhx+IPcuMbD20j5JSa i0ix/Nd2pd+04xlp18pTf0GCmQA4XeZS8s1mN1qZ6yMTe7F92ddwJMqZcA9H616z+s+F u1uA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=gcWC20Sh; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-83991-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83991-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id lk4-20020a17090308c400b001dbcb39dd7csi1953877plb.198.2024.02.27.12.52.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 12:52:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83991-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=gcWC20Sh; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-83991-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83991-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 26D81284FD0 for ; Tue, 27 Feb 2024 20:52:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF79D150990; Tue, 27 Feb 2024 20:51:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="gcWC20Sh" Received: from smtp.smtpout.orange.fr (smtp-27.smtpout.orange.fr [80.12.242.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 128D114EFFF for ; Tue, 27 Feb 2024 20:51:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.27 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709067077; cv=none; b=fZhXq/RzsWMBXhw8R4oDt1bbxfzP5oGPd1XMRZfiC1g1H5gNvZnHcUzAm6cVCYY36MWmuEs2cZ648XSf8DfcieIoyRYTR6qoMhEeGb0GFpPSJ2ALABTIlBa+muw23t7goBg5UCuXza3RSLJTTf2z8Nva0LSqZGecm+BULS38jvw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709067077; c=relaxed/simple; bh=8UZtwuLFt1gMui9a2Im7UgO6iF/un1cR2TCSHsPBa04=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Dd7CqpEbgo3f4ccu/XN3qYvCK4H6VrD7ApOFhh6qVRKMdWDuLpT7DOUDAQo1F6MiKVzVw4gIqQJZTCblUGyMU5xP8N0Bh92I0u8oVoF9QqCmCTgtP1oN17PkWK+ZDGKfgpHf3Afi14KPmDLo+5kJLgSboEoVWov2an1pMQomf1M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=gcWC20Sh; arc=none smtp.client-ip=80.12.242.27 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Received: from fedora.home ([92.140.202.140]) by smtp.orange.fr with ESMTPA id f4PjrRU7nxsbMf4PwrnVkS; Tue, 27 Feb 2024 21:51:12 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1709067072; bh=+f4AbVJbx28S60iHUgdJzBPh+asTj/MtBzhNY4Ac8Mw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gcWC20ShNiGpb3YLDEDliWcB/JrBjMeZvLiuX67SiQq7eqjFdQUY2LHnAXwPqJNJY yWw2f7Uqpygzy9cv/62d5bB2+6RsO7P4lOL/IVjXvA6NI26jU5+9grghCbYdyp1OG4 jXp60QFwXgvk5vHlKq3j0r2bM5r+tY5/cuZ6Ng2EtGwPYYgA98JHMe927Qazz6XHXC opadKaVCYDe1tWN0/ZXKb2tMl+c6hRZCjdK9EKk17II29QnrlvJnmXESVkyMW2Gp5T 3cSWhIEHQZ33KHj7nh2o+UApC2K1iywSVoy+JVNjFJLD7wKtcMnhMSj6ozH0aGp086 MCm/cIjUeRNZw== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 27 Feb 2024 21:51:12 +0100 X-ME-IP: 92.140.202.140 From: Christophe JAILLET To: andy@greyhouse.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH net 1/2] net: tehuti: Fix a missing pci_disable_msi() in the error handling path of bdx_probe() Date: Tue, 27 Feb 2024 21:50:55 +0100 Message-ID: <011588ecfd6689e27237f96213acdb7a3543f981.1709066709.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.43.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit If an error occurs after a successful call to pci_enable_msi(), pci_disable_msi() should be called as already done in the remove function. Add a new label and the missing pci_disable_msi() call. Fixes: 1a348ccc1047 ("[NET]: Add Tehuti network driver.") Signed-off-by: Christophe JAILLET --- Compile tested only. --- drivers/net/ethernet/tehuti/tehuti.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/tehuti/tehuti.c b/drivers/net/ethernet/tehuti/tehuti.c index ca409515ead5..938a5caf5a3b 100644 --- a/drivers/net/ethernet/tehuti/tehuti.c +++ b/drivers/net/ethernet/tehuti/tehuti.c @@ -1965,7 +1965,7 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ndev = alloc_etherdev(sizeof(struct bdx_priv)); if (!ndev) { err = -ENOMEM; - goto err_out_iomap; + goto err_out_disable_msi; } ndev->netdev_ops = &bdx_netdev_ops; @@ -2031,7 +2031,7 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (bdx_read_mac(priv)) { pr_err("load MAC address failed\n"); err = -EFAULT; - goto err_out_iomap; + goto err_out_disable_msi; } SET_NETDEV_DEV(ndev, &pdev->dev); err = register_netdev(ndev); @@ -2048,6 +2048,11 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) err_out_free: free_netdev(ndev); +err_out_disable_msi: +#ifdef BDX_MSI + if (nic->irq_type == IRQ_MSI) + pci_disable_msi(pdev); +#endif err_out_iomap: iounmap(nic->regs); err_out_res: -- 2.43.2