]> git.karo-electronics.de Git - linux-beck.git/commit
dmaengine: stm32-dma: Fix null pointer dereference in stm32_dma_tx_status
authorM'boumba Cedric Madianga <cedric.madianga@gmail.com>
Tue, 13 Dec 2016 13:40:46 +0000 (14:40 +0100)
committerVinod Koul <vinod.koul@intel.com>
Mon, 2 Jan 2017 03:58:52 +0000 (09:28 +0530)
commit57b5a32135c813f2ab669039fb4ec16b30cb3305
tree5db51a28628595e87a6c8f9df879cc84140a3666
parent7e96304d99477de1f70db42035071e56439da817
dmaengine: stm32-dma: Fix null pointer dereference in stm32_dma_tx_status

chan->desc is always set to NULL when a DMA transfer is complete.
As a DMA transfer could be complete during the call of stm32_dma_tx_status,
we need to be sure that chan->desc is not NULL before using this variable
to avoid a null pointer deference issue.

Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@gmail.com>
Reviewed-by: Ludovic BARRE <ludovic.barre@st.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/stm32-dma.c