projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
645a575
)
mmc: tmio: Improve error handling
author
Marek Vasut
<
[email protected]
>
Tue, 30 Oct 2018 20:53:29 +0000
(21:53 +0100)
committer
Marek Vasut
<
[email protected]
>
Fri, 2 Nov 2018 14:57:14 +0000
(15:57 +0100)
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 <
[email protected]
>
Cc: Masahiro Yamada <
[email protected]
>
drivers/mmc/tmio-common.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/tmio-common.c
b/drivers/mmc/tmio-common.c
index 5f927c6150dd18919794973145c961904b341d97..f1ce019db5a6cbd7da762cfdf8ebf7a1bcb9ad4c 100644
(file)
--- 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,
ret = tmio_sd_dma_xfer(dev, data);
else
ret = tmio_sd_pio_xfer(dev, data);
+ if (ret)
+ return ret;
ret = tmio_sd_wait_for_irq(dev, TMIO_SD_INFO1,
TMIO_SD_INFO1_CMP);
@@
-505,9
+507,8
@@
int tmio_sd_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
return ret;
}
- tmio_sd_wait_for_irq(dev, TMIO_SD_INFO2, TMIO_SD_INFO2_SCLKDIVEN);
-
- return ret;
+ return tmio_sd_wait_for_irq(dev, TMIO_SD_INFO2,
+ TMIO_SD_INFO2_SCLKDIVEN);
}
static int tmio_sd_set_bus_width(struct tmio_sd_priv *priv,