public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] MMC: Do not write to mmc_uclass_priv if it was not allocated
@ 2016-06-25 21:57 Matt Corallo
  2016-06-29  3:27 ` Simon Glass
  0 siblings, 1 reply; 8+ messages in thread
From: Matt Corallo @ 2016-06-25 21:57 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Matt Corallo <git@bluematt.me>
---
 drivers/mmc/mmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index aabfc71..eba20f0 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1734,7 +1734,8 @@ int mmc_init(struct mmc *mmc)
 #ifdef CONFIG_DM_MMC
 	struct mmc_uclass_priv *upriv = dev_get_uclass_priv(mmc->dev);

-	upriv->mmc = mmc;
+	if (upriv)
+		upriv->mmc = mmc;
 #endif
 	if (mmc->has_init)
 		return 0;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-07-04  2:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-25 21:57 [U-Boot] [PATCH] MMC: Do not write to mmc_uclass_priv if it was not allocated Matt Corallo
2016-06-29  3:27 ` Simon Glass
2016-06-30 19:18   ` Mateusz Kulikowski
2016-06-30 19:28     ` Simon Glass
2016-06-30 22:35       ` Matt Corallo
2016-07-01 11:37       ` Jaehoon Chung
2016-07-01 18:17         ` Simon Glass
2016-07-04  2:28           ` Jaehoon Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox