mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 09:12:08 +02:00
mmc: tmio: Improve error handling
Properly handle return values and abort operations when they are non-zero. This is a minor improvement, which fixes two remaining unchecked return values. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
@@ -498,6 +498,8 @@ int tmio_sd_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
|
|||||||
ret = tmio_sd_dma_xfer(dev, data);
|
ret = tmio_sd_dma_xfer(dev, data);
|
||||||
else
|
else
|
||||||
ret = tmio_sd_pio_xfer(dev, data);
|
ret = tmio_sd_pio_xfer(dev, data);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
ret = tmio_sd_wait_for_irq(dev, TMIO_SD_INFO1,
|
ret = tmio_sd_wait_for_irq(dev, TMIO_SD_INFO1,
|
||||||
TMIO_SD_INFO1_CMP);
|
TMIO_SD_INFO1_CMP);
|
||||||
@@ -505,9 +507,8 @@ int tmio_sd_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmio_sd_wait_for_irq(dev, TMIO_SD_INFO2, TMIO_SD_INFO2_SCLKDIVEN);
|
return tmio_sd_wait_for_irq(dev, TMIO_SD_INFO2,
|
||||||
|
TMIO_SD_INFO2_SCLKDIVEN);
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int tmio_sd_set_bus_width(struct tmio_sd_priv *priv,
|
static int tmio_sd_set_bus_width(struct tmio_sd_priv *priv,
|
||||||
|
Reference in New Issue
Block a user