summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-topcliff-pch.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-topcliff-pch.c')
-rw-r--r--drivers/spi/spi-topcliff-pch.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
index 8c4615b76339..8e1cc345810a 100644
--- a/drivers/spi/spi-topcliff-pch.c
+++ b/drivers/spi/spi-topcliff-pch.c
@@ -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)