From 35f189cf81b2bf4661e3394c2e54e77c2f07c36b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 7 May 2021 20:01:01 +0200 Subject: [PATCH] mt76: mt7915: fix uninitialized variable in MSI error handling Signed-off-by: Felix Fietkau --- mt7915/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mt7915/pci.c b/mt7915/pci.c index 243338ce..340b364d 100644 --- a/mt7915/pci.c +++ b/mt7915/pci.c @@ -265,12 +265,12 @@ static int mt7915_pci_probe(struct pci_dev *pdev, if (!mdev) return -ENOMEM; + dev = container_of(mdev, struct mt7915_dev, mt76); + ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES); if (ret < 0) goto free; - dev = container_of(mdev, struct mt7915_dev, mt76); - ret = mt7915_mmio_init(mdev, pcim_iomap_table(pdev)[0], pdev->irq); if (ret) goto error;