lkml.org 
[lkml]   [2022]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] spi: add missing pci_dev_put() before return
Date
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
\
 
 \ /
  Last update: 2022-02-15 03:03    [W:0.238 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site