* [U-Boot] [PATCH] mmc_get_dev: Return error if mmc_init fails
@ 2012-08-10 18:59 Benoît Thébaudeau
0 siblings, 0 replies; only message in thread
From: Benoît Thébaudeau @ 2012-08-10 18:59 UTC (permalink / raw)
To: u-boot
Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
Cc: Andy Fleming <afleming@gmail.com>
---
.../drivers/mmc/mmc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git u-boot-4d3c95f.orig/drivers/mmc/mmc.c u-boot-4d3c95f/drivers/mmc/mmc.c
index c1c2862..c0b969c 100644
--- u-boot-4d3c95f.orig/drivers/mmc/mmc.c
+++ u-boot-4d3c95f/drivers/mmc/mmc.c
@@ -1311,10 +1311,9 @@ int mmc_register(struct mmc *mmc)
block_dev_desc_t *mmc_get_dev(int dev)
{
struct mmc *mmc = find_mmc_device(dev);
- if (!mmc)
+ if (!mmc || mmc_init(mmc))
return NULL;
- mmc_init(mmc);
return &mmc->block_dev;
}
#endif
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-10 18:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-10 18:59 [U-Boot] [PATCH] mmc_get_dev: Return error if mmc_init fails Benoît Thébaudeau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox