mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
spi: add missing pci_dev_put() before return
pci_get_slot() increases its reference count, the caller must decrement the reference count by calling pci_dev_put() Signed-off-by: Wang Qing <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
1 parent
1847e3046c
commit
4d986ffa03
1 file changed
+5
-2
@@ -877,7 +877,7 @@ static void pch_spi_request_dma(struct pch_spi_data *data, int bpw)
|
||||
dev_err(&data->master->dev,
|
||||
"ERROR: dma_request_channel FAILS(Tx)\n");
|
||||
data->use_dma = 0;
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
dma->chan_tx = chan;
|
||||
|
||||
@@ -894,9 +894,12 @@ static void pch_spi_request_dma(struct pch_spi_data *data, int bpw)
|
||||
dma_release_channel(dma->chan_tx);
|
||||
dma->chan_tx = NULL;
|
||||
data->use_dma = 0;
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
dma->chan_rx = chan;
|
||||
|
||||
out:
|
||||
pci_dev_put(dma_dev);
|
||||
}
|
||||
|
||||
static void pch_spi_release_dma(struct pch_spi_data *data)
|
||||
|
||||
Reference in new issue
Block a user