Skip to contentSkip to conversation

spi: add missing pci_dev_put() before return

PATCH In review Qing Wang 3 participants 3 messages Feb 15, 2022 – Feb 23, 2022

Subsystems (3)
lore
Share & tools
lore

Qing Wang

author
#0 lore raw

PATCH 1/1 spi: add missing pci_dev_put() before return

From: Wang Qing <[email protected]>

pci_get_slot() increases its reference count, the caller must decrement the reference count by calling pci_dev_put()

---
 drivers/spi/spi-pxa2xx-pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/spi/spi-pxa2xx-pci.c +2 -0
index 2e134eb..5fb2f44
@@ -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;
 }
 
Signature · 7 lines
2.7.4


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

Hi Qing,

Quoted 6 lines · Qing Wang

From: Wang Qing <[email protected]>

pci_get_slot() increases its reference count, the caller must decrement the reference count by calling pci_dev_put()

Thanks for your patch!

Please use "spi: spi-topcliff-pch:" instead of just "spi:" in the patch summary, as this is specific to the spi-topcliff-pch driver, not to the SPI core.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw
In reply to Qing Wang
Quoted 5 lines · Qing Wang

From: Wang Qing <[email protected]>

pci_get_slot() increases its reference count, the caller must decrement the reference count by calling pci_dev_put()

Thanks for the report!

This is not fully correct. I'll send a patch soon.

Signature · 2 lines
With Best Regards,
Andy Shevchenko