]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mt76: mt7996: remove redundant pdev->bus check in probe
authorLorenzo Bianconi <lorenzo@kernel.org>
Fri, 22 May 2026 07:24:52 +0000 (09:24 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 9 Jun 2026 10:15:22 +0000 (10:15 +0000)
Drop the unnecessary pdev->bus NULL check in mt7996_pci_probe() since
the pointer is already dereferenced earlier in mt76_pci_disable_aspm(),
making the check dead code. Silences the related Smatch warning.

Fixes: 377aa17d2aed ("wifi: mt76: mt7996: Add NPU offload support to MT7996 driver")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20260522-mt7996-pdev-bus-fix-v1-1-c91716484365@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7996/pci.c

index 12523ddba6304104467798e5b1465556751fe6de..b7d9193e042f484d923e4b9cfd1bdd77fad8ae88 100644 (file)
@@ -141,7 +141,7 @@ static int mt7996_pci_probe(struct pci_dev *pdev,
        dev->hif2 = hif2;
 
        mt76_npu_init(mdev, pci_resource_start(pdev, 0),
-                     pdev->bus && pci_domain_nr(pdev->bus) ? 3 : 2);
+                     pci_domain_nr(pdev->bus) ? 3 : 2);
 
        ret = mt7996_mmio_wed_init(dev, pdev, false, &irq);
        if (ret < 0)