Skip to content
Commit 5938196c authored by Xiongfeng Wang's avatar Xiongfeng Wang Committed by Felix Fietkau
Browse files

mt76: mt7915: Fix PCI device refcount leak in mt7915_pci_init_hif2()

As comment of pci_get_device() says, it returns a pci_device with its
refcount increased. We need to call pci_dev_put() to decrease the
refcount. Save the return value of pci_get_device() and call
pci_dev_put() to decrease the refcount.

Fixes: 9093cfff ("mt76: mt7915: add support for using a secondary PCIe link for gen1")
Fixes: 2e30db0d

 ("mt76: mt7915: add device id for mt7916")
Signed-off-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent f37f76d4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment