]> git.baikalelectronics.ru Git - kernel.git/commit
spi: topcliff-pch: Prevent usage of potentially stale DMA device
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 7 Mar 2022 17:37:40 +0000 (19:37 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 8 Mar 2022 12:28:07 +0000 (12:28 +0000)
commit7518f6e3e6481be16dc99b046ff453a6623de7c0
tree4a9e008dd6307bc56d1b69a8b76e40c7ab707203
parent9397eedbaaaa7568fb38d043e5c215d4acb58bea
spi: topcliff-pch: Prevent usage of potentially stale DMA device

DMA device is expected to be available while SPI transfer is ongoing.

Prevent usage of potentially stale DMA device by keeping reference
count till the end of the transfer.

Fixes: 2ef3576a49d9 ("spi: add missing pci_dev_put() before return")
Reported-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220307173740.80996-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-topcliff-pch.c