[fixup] check NULL pointer before access (#8573)

Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
Shell
2024-03-02 16:05:19 +08:00
committed by GitHub
parent 00c6800e4e
commit 53754ff50a
7 changed files with 54 additions and 31 deletions
+2 -1
View File
@@ -9,10 +9,11 @@
*/
#include <stdio.h>
#include <rtthread.h>
int main(void)
{
printf("hello rt-thread\n");
rt_kprintf("hello rt-thread\n");
return 0;
}
@@ -14,6 +14,10 @@
#include "mmu.h"
#include "gtimer.h"
#ifdef BSP_USING_GICV3
#include <gicv3.h>
#endif
#ifdef RT_USING_SMP
extern unsigned long MMUTable[];
@@ -29,6 +33,10 @@ void rt_hw_secondary_cpu_bsp_start(void)
arm_gic_cpu_init(0, 0);
#ifdef BSP_USING_GICV3
arm_gic_redist_init(0, 0);
#endif /* BSP_USING_GICV3 */
// local timer init
rt_hw_gtimer_init();