Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx> --- drivers/mci/imx-esdhc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c index 8c2695c..8194b4d 100644 --- a/drivers/mci/imx-esdhc.c +++ b/drivers/mci/imx-esdhc.c @@ -450,10 +450,15 @@ static int esdhc_card_present(struct mci_host *mci) static int esdhc_init(struct mci_host *mci, struct device_d *dev) { struct fsl_esdhc_host *host = to_fsl_esdhc(mci); - struct fsl_esdhc __iomem *regs = host->regs; + struct fsl_esdhc __iomem *regs; int timeout = 1000; int ret = 0; + if (!host) + return -EIO; + + regs = host->regs; + /* Enable cache snooping */ if (host && !host->no_snoop) esdhc_write32(®s->scr, 0x00000040); -- 1.8.1.5 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox