summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpalmyzf <[email protected]>2023-04-14 00:30:28 +0800
committerGitHub <[email protected]>2023-04-14 00:30:28 +0800
commit8e8fcef7b8fa805cec74c2051c415d6ccec99a7e (patch)
tree139665348afb5577aa93427423e3a9365fcd908b
parent83c0565e36a99f183c3682e471c779d4f521c03c (diff)
[HUST CSE]avoids null pointer problems (#7233)
* [HUST CSE]avoids null pointer problems * Update hal_dma.c * Update hal_dma.c * Update hal_dma.c
-rw-r--r--bsp/allwinner/libraries/sunxi-hal/hal/source/dma/hal_dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/source/dma/hal_dma.c b/bsp/allwinner/libraries/sunxi-hal/hal/source/dma/hal_dma.c
index 3b34f0e1e9..31137b1f76 100644
--- a/bsp/allwinner/libraries/sunxi-hal/hal/source/dma/hal_dma.c
+++ b/bsp/allwinner/libraries/sunxi-hal/hal/source/dma/hal_dma.c
@@ -493,7 +493,7 @@ hal_dma_status_t hal_dma_prep_cyclic(struct sunxi_dma_chan *chan,
uint32_t i = 0;
uint32_t __cpsr;
- if ((NULL == chan && chan->cyclic) || (0 == buf_addr))
+ if ((NULL == chan) || (0 == buf_addr))
{
DMA_ERR("[dma] chan or buf_addr is NULL\n");
return HAL_DMA_STATUS_INVALID_PARAMETER;