diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2020-04-19 18:49:06 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-04-23 09:12:51 +0200 |
commit | 363c32701c7fdc8265a84b21a6a4f45d1202b9ca (patch) | |
tree | 9ac3f931413b11cce707c05580de6dffcf1db1ce /drivers/dma/mmp_tdma.c | |
parent | dmaengine: pch_dma.c: Avoid data race between probe and irq handler (diff) | |
download | linux-363c32701c7fdc8265a84b21a6a4f45d1202b9ca.tar.xz linux-363c32701c7fdc8265a84b21a6a4f45d1202b9ca.zip |
dmaengine: mmp_tdma: Do not ignore slave config validation errors
With an invalid dma_slave_config set previously,
mmp_tdma_prep_dma_cyclic() would detect an error whilst configuring the
channel, but proceed happily on:
[ 120.756530] mmp-tdma d42a0800.adma: mmp_tdma: unknown burst size.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Link: https://lore.kernel.org/r/20200419164912.670973-2-lkundrak@v3.sk
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/mmp_tdma.c')
-rw-r--r-- | drivers/dma/mmp_tdma.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c index 10117f271b12..51e08c16756a 100644 --- a/drivers/dma/mmp_tdma.c +++ b/drivers/dma/mmp_tdma.c @@ -443,7 +443,8 @@ static struct dma_async_tx_descriptor *mmp_tdma_prep_dma_cyclic( if (!desc) goto err_out; - mmp_tdma_config_write(chan, direction, &tdmac->slave_config); + if (mmp_tdma_config_write(chan, direction, &tdmac->slave_config)) + goto err_out; while (buf < buf_len) { desc = &tdmac->desc_arr[i]; |