Signed-off-by: Matt Corallo <g...@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
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to