mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-04-05 10:20:05 +00:00
[errno code][-RT_ERROR] fix that use RT_ERROR without -
This commit is contained in:
committed by
Man, Jianting (Meco)
parent
de963feef4
commit
0f461e870c
@@ -407,7 +407,7 @@ static rt_err_t sdhci_setclock(struct sdhci_t * sdhci, rt_uint32_t clock)
|
||||
if (count <= 0)
|
||||
{
|
||||
rt_kprintf("EMMC: Set clock: timeout waiting for inhibit flags. Status %08x.\n",read32(pdat->virt + EMMC_STATUS));
|
||||
return RT_ERROR;
|
||||
return -RT_ERROR;
|
||||
}
|
||||
|
||||
// Switch clock off.
|
||||
@@ -436,7 +436,7 @@ static rt_err_t sdhci_setclock(struct sdhci_t * sdhci, rt_uint32_t clock)
|
||||
if (count <= 0)
|
||||
{
|
||||
rt_kprintf("EMMC: ERROR: failed to get stable clock %d.\n", clock);
|
||||
return RT_ERROR;
|
||||
return -RT_ERROR;
|
||||
}
|
||||
mmcsd_dbg("set stable clock %d.\n", clock);
|
||||
return RT_EOK;
|
||||
@@ -486,7 +486,7 @@ static rt_err_t reset_emmc(struct sdhci_pdata_t * pdat){
|
||||
if (cnt <= 0)
|
||||
{
|
||||
rt_kprintf("ERROR: failed to reset EMMC\n");
|
||||
return RT_ERROR;
|
||||
return -RT_ERROR;
|
||||
}
|
||||
temp = read32((pdat->virt + EMMC_CONTROL1));
|
||||
temp |= C1_CLK_INTLEN | C1_TOUNIT_MAX;
|
||||
|
||||
@@ -131,7 +131,7 @@ static rt_err_t spi_transfernb(rt_uint8_t* tbuf, rt_uint8_t* rbuf, rt_uint32_t l
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
static rt_uint32_t raspi_spi_xfer(struct rt_spi_device *device, struct rt_spi_message *message)
|
||||
static rt_ssize_t raspi_spi_xfer(struct rt_spi_device *device, struct rt_spi_message *message)
|
||||
{
|
||||
|
||||
RT_ASSERT(device != RT_NULL);
|
||||
@@ -163,7 +163,7 @@ static rt_uint32_t raspi_spi_xfer(struct rt_spi_device *device, struct rt_spi_me
|
||||
spi_gpio_write(cs_pin, 1);
|
||||
|
||||
if (res != RT_EOK)
|
||||
return RT_ERROR;
|
||||
return res;
|
||||
|
||||
return message->length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user