Modify the return code with using macro
This commit is contained in:
parent
e5fac04e7d
commit
204376f0ec
|
@ -574,7 +574,7 @@ int rt_hw_sdcard_init(void)
|
||||||
{
|
{
|
||||||
rt_kprintf("allocate partition sector buffer failed\n");
|
rt_kprintf("allocate partition sector buffer failed\n");
|
||||||
|
|
||||||
return -1;
|
return -RT_ERROR;
|
||||||
}
|
}
|
||||||
status = sd_readblock(0, sector);
|
status = sd_readblock(0, sector);
|
||||||
if (status == RT_EOK)
|
if (status == RT_EOK)
|
||||||
|
@ -637,7 +637,7 @@ int rt_hw_sdcard_init(void)
|
||||||
/* release sector buffer */
|
/* release sector buffer */
|
||||||
rt_free(sector);
|
rt_free(sector);
|
||||||
|
|
||||||
return -1;
|
return -RT_ERROR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -196,7 +196,7 @@ int rt_hw_uart_init(void)
|
||||||
rt_hw_interrupt_install(_hwserial2.irqno, rt_hw_uart_isr, &_serial2, "uart2");
|
rt_hw_interrupt_install(_hwserial2.irqno, rt_hw_uart_isr, &_serial2, "uart2");
|
||||||
rt_hw_interrupt_umask(INTUART2);
|
rt_hw_interrupt_umask(INTUART2);
|
||||||
|
|
||||||
return 0;
|
return RT_EOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
INIT_BOARD_EXPORT(rt_hw_uart_init);
|
INIT_BOARD_EXPORT(rt_hw_uart_init);
|
||||||
|
|
Loading…
Reference in New Issue