Commit 4d986ffa authored by Wang Qing's avatar Wang Qing Committed by Mark Brown

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: default avatarWang Qing <wangqing@vivo.com>
Link: https://lore.kernel.org/r/1644890407-65167-1-git-send-email-wangqing@vivo.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1847e304
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment