projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05ed2ae
)
spi: dw-mid: check that DMA was inited before exit
author
Andy Shevchenko
<
[email protected]
>
Fri, 12 Sep 2014 12:11:58 +0000
(15:11 +0300)
committer
Mark Brown
<
[email protected]
>
Sat, 13 Sep 2014 16:01:57 +0000
(17:01 +0100)
If the driver was compiled with DMA support, but DMA channels weren't acquired
by some reason, mid_spi_dma_exit() will crash the kernel.
Fixes: 7063c0d942a1 (spi/dw_spi: add DMA support)
Signed-off-by: Andy Shevchenko <
[email protected]
>
Signed-off-by: Mark Brown <
[email protected]
>
drivers/spi/spi-dw-mid.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-dw-mid.c
b/drivers/spi/spi-dw-mid.c
index 6d207afec8cbdb578c9e5428d6018dff1d93690b..0d88e4aab73ea2f7ccc9e90b249c7cb9ac305ea2 100644
(file)
--- a/
drivers/spi/spi-dw-mid.c
+++ b/
drivers/spi/spi-dw-mid.c
@@
-89,6
+89,8
@@
err_exit:
static void mid_spi_dma_exit(struct dw_spi *dws)
{
+ if (!dws->dma_inited)
+ return;
dma_release_channel(dws->txchan);
dma_release_channel(dws->rxchan);
}