mirror of https://github.com/RT-Thread/rt-thread
[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
This commit is contained in:
parent
83c0565e36
commit
8e8fcef7b8
|
@ -493,7 +493,7 @@ hal_dma_status_t hal_dma_prep_cyclic(struct sunxi_dma_chan *chan,
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
uint32_t __cpsr;
|
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");
|
DMA_ERR("[dma] chan or buf_addr is NULL\n");
|
||||||
return HAL_DMA_STATUS_INVALID_PARAMETER;
|
return HAL_DMA_STATUS_INVALID_PARAMETER;
|
||||||
|
|
Loading…
Reference in New Issue