Skip to content

Commit d41ad2c

Browse files
Huibin HongJayJiang-ASUS
authored andcommitted
spi: rockchip: init rxconf and txconf to 0
Dmac pl330 adds src_interlace_size of dma_slave_config rxconf. If rxconf is local variable, src_interlace_size may be non zero, which causes wrong process. Fixes: ddd2e87 ("dmaengine: pl330: add support for interlace size config") Change-Id: Ib301c7ca4a1175bafd0631cb4deea4baa60eebc7 Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
1 parent 7aa0a1b commit d41ad2c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/spi/spi-rockchip.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ static int rockchip_spi_prepare_dma(struct rockchip_spi *rs)
439439
struct dma_slave_config rxconf, txconf;
440440
struct dma_async_tx_descriptor *rxdesc, *txdesc;
441441

442+
memset(&rxconf, 0, sizeof(struct dma_slave_config));
443+
memset(&txconf, 0, sizeof(struct dma_slave_config));
444+
442445
spin_lock_irqsave(&rs->lock, flags);
443446
rs->state &= ~RXBUSY;
444447
rs->state &= ~TXBUSY;

0 commit comments

Comments
 (0)