diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2016-09-25 23:10:02 (GMT) |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2016-10-10 06:23:33 (GMT) |
commit | 2cb5d67c1aceb758033954cc06382367ac89e6ac (patch) | |
tree | 033c23524ed8a33e7364b29b34069f2ce5a6041f /drivers/mmc/s5p_sdhci.c | |
parent | 895549a2d994ecf1ca1636792e55019e56be2d7d (diff) | |
download | u-boot-fsl-qoriq-2cb5d67c1aceb758033954cc06382367ac89e6ac.tar.xz |
mmc: sdhci: use the generic error number
Use the generic error number instead of meaningless value.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mmc/s5p_sdhci.c')
-rw-r--r-- | drivers/mmc/s5p_sdhci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c index d7cfa3e..b329bef 100644 --- a/drivers/mmc/s5p_sdhci.c +++ b/drivers/mmc/s5p_sdhci.c @@ -100,7 +100,7 @@ int s5p_sdhci_init(u32 regbase, int index, int bus_width) struct sdhci_host *host = calloc(1, sizeof(struct sdhci_host)); if (!host) { printf("sdhci__host allocation fail!\n"); - return 1; + return -ENOMEM; } host->ioaddr = (void *)regbase; host->index = index; @@ -154,7 +154,7 @@ static int sdhci_get_config(const void *blob, int node, struct sdhci_host *host) dev_id = pinmux_decode_periph_id(blob, node); if (dev_id < PERIPH_ID_SDMMC0 && dev_id > PERIPH_ID_SDMMC3) { debug("MMC: Can't get device id\n"); - return -1; + return -EINVAL; } host->index = dev_id - PERIPH_ID_SDMMC0; @@ -162,7 +162,7 @@ static int sdhci_get_config(const void *blob, int node, struct sdhci_host *host) bus_width = fdtdec_get_int(blob, node, "samsung,bus-width", 0); if (bus_width <= 0) { debug("MMC: Can't get bus-width\n"); - return -1; + return -EINVAL; } host->bus_width = bus_width; @@ -170,7 +170,7 @@ static int sdhci_get_config(const void *blob, int node, struct sdhci_host *host) base = fdtdec_get_addr(blob, node, "reg"); if (!base) { debug("MMC: Can't get base address\n"); - return -1; + return -EINVAL; } host->ioaddr = (void *)base; |