mirror of
https://github.com/torvalds/linux.git
synced 2024-11-19 10:31:48 +00:00
spi: rockchip: initialize dma_slave_config properly
The rxconf and txconf structs are allocated on the stack, so make sure we zero them before filling out the relevant fields. Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
940ec770c2
commit
dd8fd2cbc7
@ -445,6 +445,9 @@ static int rockchip_spi_prepare_dma(struct rockchip_spi *rs)
|
||||
struct dma_slave_config rxconf, txconf;
|
||||
struct dma_async_tx_descriptor *rxdesc, *txdesc;
|
||||
|
||||
memset(&rxconf, 0, sizeof(rxconf));
|
||||
memset(&txconf, 0, sizeof(txconf));
|
||||
|
||||
spin_lock_irqsave(&rs->lock, flags);
|
||||
rs->state &= ~RXBUSY;
|
||||
rs->state &= ~TXBUSY;
|
||||
|
Loading…
Reference in New Issue
Block a user