diff --git a/mt7603/pci.c b/mt7603/pci.c index a5845da3..06fa28f6 100644 --- a/mt7603/pci.c +++ b/mt7603/pci.c @@ -57,7 +57,8 @@ mt76pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) return 0; error: - ieee80211_free_hw(mt76_hw(dev)); + mt76_free_device(&dev->mt76); + return ret; } diff --git a/mt7615/mmio.c b/mt7615/mmio.c index b108324a..a7f92fa0 100644 --- a/mt7615/mmio.c +++ b/mt7615/mmio.c @@ -240,7 +240,8 @@ int mt7615_mmio_probe(struct device *pdev, void __iomem *mem_base, return 0; error: - ieee80211_free_hw(mt76_hw(dev)); + mt76_free_device(&dev->mt76); + return ret; } diff --git a/mt76x0/pci.c b/mt76x0/pci.c index dda11c70..b87d8e13 100644 --- a/mt76x0/pci.c +++ b/mt76x0/pci.c @@ -194,7 +194,8 @@ mt76x0e_probe(struct pci_dev *pdev, const struct pci_device_id *id) return 0; error: - ieee80211_free_hw(mt76_hw(dev)); + mt76_free_device(&dev->mt76); + return ret; } diff --git a/mt76x2/pci.c b/mt76x2/pci.c index 4d50dad2..ecaf85b4 100644 --- a/mt76x2/pci.c +++ b/mt76x2/pci.c @@ -90,7 +90,8 @@ mt76x2e_probe(struct pci_dev *pdev, const struct pci_device_id *id) return 0; error: - ieee80211_free_hw(mt76_hw(dev)); + mt76_free_device(&dev->mt76); + return ret; } diff --git a/mt7915/pci.c b/mt7915/pci.c index edc34192..3e7f1a30 100644 --- a/mt7915/pci.c +++ b/mt7915/pci.c @@ -108,7 +108,7 @@ static int mt7915_pci_probe(struct pci_dev *pdev, ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); if (ret) - return ret; + goto error; mdev = mt76_alloc_device(&pdev->dev, sizeof(*dev), &mt7915_ops, &drv_ops); @@ -138,7 +138,8 @@ static int mt7915_pci_probe(struct pci_dev *pdev, return 0; error: - ieee80211_free_hw(mt76_hw(dev)); + mt76_free_device(&dev->mt76); + return ret; }