Skip to content
Commit 620a7e4c authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Vinod Koul
Browse files

dmaengine: xilinx: xdma: Fix initialization location of desc in xdma_channel_isr()

Clang warns (or errors with CONFIG_WERROR=y):

  drivers/dma/xilinx/xdma.c:894:3: error: variable 'desc' is uninitialized when used here [-Werror,-Wuninitialized]
    894 |                 desc->error = true;
        |                 ^~~~

The initialization of desc was moved too far forward, move it back so
that this assignment does not result in a potential crash at runtime
while clearing up the warning.

Closes: https://github.com/ClangBuiltLinux/linux/issues/1972


Fixes: 2f8f90cd ("dmaengine: xilinx: xdma: Implement interleaved DMA transfers")
Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20231222-dma-xilinx-xdma-clang-fixes-v1-2-84a18ff184d2@kernel.org


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent fe0d495e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment