diff options
author | Xiongfeng Wang <wangxiongfeng2@huawei.com> | 2022-11-22 19:45:59 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-22 17:58:51 +0100 |
commit | 8be3a7bf773700534a6e8f87f6ed2ed111254be5 (patch) | |
tree | 24dbe0b31c7ef57f07f1baba0f41b21dc0ae0a0d /tools/perf/scripts/python/arm-cs-trace-disasm.py | |
parent | 22cf92bb3908e1bbc22b03371e9e67e7bd455e0f (diff) |
serial: pch: Fix PCI device refcount leak in pch_request_dma()
As comment of pci_get_slot() says, it returns a pci_device with its
refcount increased. The caller must decrement the reference count by
calling pci_dev_put().
Since 'dma_dev' is only used to filter the channel in filter(), we can
call pci_dev_put() before exiting from pch_request_dma(). Add the
missing pci_dev_put() for the normal and error path.
Fixes: 3c6a483275f4 ("Serial: EG20T: add PCH_UART driver")
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Link: https://lore.kernel.org/r/20221122114559.27692-1-wangxiongfeng2@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/arm-cs-trace-disasm.py')
0 files changed, 0 insertions, 0 deletions