Messages in this thread Patch in this message | | | From | Qing Wang <> | Subject | [PATCH] spi: add missing pci_dev_put() before return | Date | Mon, 14 Feb 2022 17:59:46 -0800 |
| |
From: Wang Qing <wangqing@vivo.com>
pci_get_slot() increases its reference count, the caller must decrement the reference count by calling pci_dev_put()
Signed-off-by: Wang Qing <wangqing@vivo.com> --- drivers/spi/spi-pxa2xx-pci.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c index 2e134eb..5fb2f44 --- a/drivers/spi/spi-pxa2xx-pci.c +++ b/drivers/spi/spi-pxa2xx-pci.c @@ -102,6 +102,8 @@ static int lpss_spi_setup(struct pci_dev *dev, struct pxa_spi_info *c) } c->dma_filter = lpss_dma_filter; + pci_dev_put(dma_dev); + return 0; } -- 2.7.4
| |