mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-22 01:15:26 +08:00
[HUST CSE]NULL POINTER (#7220)
* avoids the risk of a null pointer * 将||改成&&来判断断言 There is a possibility of a null pointer * there is a possibility of a null pointer * Update components/drivers/fdt/src/dtb_get.c Co-authored-by: Man, Jianting (Meco) <920369182@qq.com> * 已根据代码规范进行修改,谢谢提醒 --------- Co-authored-by: Man, Jianting (Meco) <920369182@qq.com>
This commit is contained in:
parent
60835af8e1
commit
7c629d974d
@ -724,6 +724,7 @@ struct dtb_memreserve *dtb_node_get_dtb_memreserve(struct dtb_node *dtb_node, in
|
|||||||
}
|
}
|
||||||
dtb_node_root = dtb_node_root->parent;
|
dtb_node_root = dtb_node_root->parent;
|
||||||
}
|
}
|
||||||
|
if(dtb_node_root == NULL) return NULL;
|
||||||
|
|
||||||
*memreserve_size = dtb_node_root->header->memreserve_sz;
|
*memreserve_size = dtb_node_root->header->memreserve_sz;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user