diff options
author | Marek Vasut | 2018-10-30 15:53:29 -0500 |
---|---|---|
committer | Marek Vasut | 2018-11-02 09:57:14 -0500 |
commit | b22c8d0de484f9a4fe677bc2f9de026771605666 (patch) | |
tree | e2be71d52643e26d9d5cf4b62a325fdfa9f3d1cd /drivers | |
parent | 645a575aeb384c7bf4ffb1204a93d140c0984fee (diff) | |
download | u-boot-b22c8d0de484f9a4fe677bc2f9de026771605666.tar.gz u-boot-b22c8d0de484f9a4fe677bc2f9de026771605666.tar.xz u-boot-b22c8d0de484f9a4fe677bc2f9de026771605666.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/tmio-common.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c index 5f927c6150..f1ce019db5 100644 --- a/drivers/mmc/tmio-common.c +++ b/drivers/mmc/tmio-common.c | |||
@@ -498,6 +498,8 @@ int tmio_sd_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, | |||
498 | ret = tmio_sd_dma_xfer(dev, data); | 498 | ret = tmio_sd_dma_xfer(dev, data); |
499 | else | 499 | else |
500 | ret = tmio_sd_pio_xfer(dev, data); | 500 | ret = tmio_sd_pio_xfer(dev, data); |
501 | if (ret) | ||
502 | return ret; | ||
501 | 503 | ||
502 | ret = tmio_sd_wait_for_irq(dev, TMIO_SD_INFO1, | 504 | ret = tmio_sd_wait_for_irq(dev, TMIO_SD_INFO1, |
503 | TMIO_SD_INFO1_CMP); | 505 | TMIO_SD_INFO1_CMP); |
@@ -505,9 +507,8 @@ int tmio_sd_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, | |||
505 | return ret; | 507 | return ret; |
506 | } | 508 | } |
507 | 509 | ||
508 | tmio_sd_wait_for_irq(dev, TMIO_SD_INFO2, TMIO_SD_INFO2_SCLKDIVEN); | 510 | return tmio_sd_wait_for_irq(dev, TMIO_SD_INFO2, |
509 | 511 | TMIO_SD_INFO2_SCLKDIVEN); | |
510 | return ret; | ||
511 | } | 512 | } |
512 | 513 | ||
513 | static int tmio_sd_set_bus_width(struct tmio_sd_priv *priv, | 514 | static int tmio_sd_set_bus_width(struct tmio_sd_priv *priv, |