Commit 620a7e4
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: ClangBuiltLinux#1972
Fixes: 2f8f90c ("dmaengine: xilinx: xdma: Implement interleaved DMA transfers")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20231222-dma-xilinx-xdma-clang-fixes-v1-2-84a18ff184d2@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>1 parent fe0d495 commit 620a7e4
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
888 | 888 | | |
889 | 889 | | |
890 | 890 | | |
| 891 | + | |
| 892 | + | |
891 | 893 | | |
892 | 894 | | |
893 | 895 | | |
| |||
901 | 903 | | |
902 | 904 | | |
903 | 905 | | |
904 | | - | |
905 | 906 | | |
906 | 907 | | |
907 | 908 | | |
| |||
0 commit comments