mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 05:16:57 +00:00
wifi: mt76: mt7915: fix double hif2 init on the non-WED path
mt7915_pci_init_hif2() was called unconditionally and again inside the
WED-inactive branch. The helper increments the global hif_idx, writes the
PCIe RECOG_ID register and takes a get_device() reference via
mt7915_pci_get_hif2(), while removal only drops one reference. On non-WED
dual-hif hardware this double-incremented hif_idx, wrote RECOG_ID twice and
leaked a device reference. Only the call inside the WED-inactive branch is
correct; drop the unconditional one. hif2 is already initialised to NULL.
Fixes: cacdd67812c6 ("mt76: mt7915: add mt7915_mmio_probe() as a common probing function")
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -135,7 +135,6 @@ static int mt7915_pci_probe(struct pci_dev *pdev,
|
||||
|
||||
mdev = &dev->mt76;
|
||||
mt7915_wfsys_reset(dev);
|
||||
hif2 = mt7915_pci_init_hif2(pdev);
|
||||
|
||||
ret = mt7915_mmio_wed_init(dev, pdev, true, &irq);
|
||||
if (ret < 0)
|
||||
|
||||
Reference in New Issue
Block a user