diff mbox series

[5.15,1/5] Revert "mt76: mt7921: Fix the error handling path of mt7921_pci_probe()"

Message ID 4bdcd29552ba78c87d8799181b9acddec465ad3c.1657764335.git.sean.wang@kernel.org
State Superseded
Headers show
Series [5.15,1/5] Revert "mt76: mt7921: Fix the error handling path of mt7921_pci_probe()" | expand

Commit Message

Sean Wang July 14, 2022, 2:07 a.m. UTC
From: Sean Wang <sean.wang@mediatek.com>

This reverts commit 663457f421d41e9d2fcb1e84baf43d1433f80c08.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
There was mistaken in
649178c0493e ("mt76: mt7921e: fix possible probe failure after reboot")
that caused WiFi reset cannot work well as the reported issue
"PROBLEM: [Stable v5.15.42+] [mt7921] Wake after suspend locks up system
when mt7921-driver is used on a Lenovo ThinkPad E15 G3"
in http://lists.infradead.org/pipermail/linux-mediatek/2022-June/042668.html
So we need to revert the patch first. Will be applied again later.
---
 drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Greg KH July 14, 2022, 6:08 a.m. UTC | #1
On Wed, Jul 13, 2022 at 07:07:38PM -0700, sean.wang@kernel.org wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> This reverts commit 649178c0493e4080b2b226b0ef9fa2d834b1b412.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
> There was mistake in
> 649178c0493e ("mt76: mt7921e: fix possible probe failure after reboot")
> that caused WiFi reset cannot work well as the reported issue
> "PROBLEM: [Stable v5.15.42+] [mt7921] Wake after suspend locks up system
> when mt7921-driver is used on a Lenovo ThinkPad E15 G3"
> in http://lists.infradead.org/pipermail/linux-mediatek/2022-June/042668.html
> So, we need to revert, fix and land it again on the stable tree from upstream.

Same questions here as on patch 1/5.
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/pci.c b/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
index 3d35838ef306..7d9b23a00238 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
@@ -254,10 +254,8 @@  static int mt7921_pci_probe(struct pci_dev *pdev,
 	dev->bus_ops = dev->mt76.bus;
 	bus_ops = devm_kmemdup(dev->mt76.dev, dev->bus_ops, sizeof(*bus_ops),
 			       GFP_KERNEL);
-	if (!bus_ops) {
-		ret = -ENOMEM;
-		goto err_free_dev;
-	}
+	if (!bus_ops)
+		return -ENOMEM;
 
 	bus_ops->rr = mt7921_rr;
 	bus_ops->wr = mt7921_wr;
@@ -266,7 +264,7 @@  static int mt7921_pci_probe(struct pci_dev *pdev,
 
 	ret = __mt7921_mcu_drv_pmctrl(dev);
 	if (ret)
-		goto err_free_dev;
+		return ret;
 
 	mdev->rev = (mt7921_l1_rr(dev, MT_HW_CHIPID) << 16) |
 		    (mt7921_l1_rr(dev, MT_HW_REV) & 0xff);