Re: [PATCH] spi: add missing pci_dev_put() before return

From: Christophe JAILLET
Date: Wed Feb 23 2022 - 15:12:10 EST


Le 23/02/2022 à 05:08, Mark Brown a écrit :
On Mon, 14 Feb 2022 18:00:07 -0800, Qing Wang wrote:
From: Wang Qing <wangqing-DGpbCiVdSXo@xxxxxxxxxxxxxxxx>

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



Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: add missing pci_dev_put() before return
commit: 4d986ffa036a773456476f70bd0fde2fb1330b7d


Hi, not sure that the patch is correct.

Shouldn't the reference be released in the error handling path and in pch_spi_release_dma() ?

Instead of *unconditionally* at the end of pch_spi_request_dma()?

CJ