diff options
| author | Jonne <[email protected]> | 2020-04-13 08:46:51 +0800 |
|---|---|---|
| committer | Jonne <[email protected]> | 2020-04-13 08:46:51 +0800 |
| commit | 204376f0ec0b2bae9d1a25edd974f8f20aa2866c (patch) | |
| tree | e7eb7c5e3878f752374c410424c3a69ea769f57c | |
| parent | e5fac04e7deb0f1ba777660e46d5ce0c421f83ca (diff) | |
Modify the return code with using macro
| -rw-r--r-- | bsp/mini2440/drivers/sdcard.c | 4 | ||||
| -rw-r--r-- | bsp/mini2440/drivers/uart.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bsp/mini2440/drivers/sdcard.c b/bsp/mini2440/drivers/sdcard.c index d20bfe71bb..9815770bab 100644 --- a/bsp/mini2440/drivers/sdcard.c +++ b/bsp/mini2440/drivers/sdcard.c @@ -574,7 +574,7 @@ int rt_hw_sdcard_init(void) { rt_kprintf("allocate partition sector buffer failed\n"); - return -1; + return -RT_ERROR; } status = sd_readblock(0, sector); if (status == RT_EOK) @@ -637,7 +637,7 @@ int rt_hw_sdcard_init(void) /* release sector buffer */ rt_free(sector); - return -1; + return -RT_ERROR; } else { diff --git a/bsp/mini2440/drivers/uart.c b/bsp/mini2440/drivers/uart.c index cd18c343d4..6226a3cb17 100644 --- a/bsp/mini2440/drivers/uart.c +++ b/bsp/mini2440/drivers/uart.c @@ -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_umask(INTUART2); - return 0; + return RT_EOK; } INIT_BOARD_EXPORT(rt_hw_uart_init); |
