mmc: moxart: Handle error from mmc_of_parse()
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 18 Dec 2014 09:41:39 +0000 (10:41 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 19 Jan 2015 08:56:12 +0000 (09:56 +0100)
Since mmc_of_parse() may fail, let's deal with it and thus do proper
error handling.

Cc: Jonas Jensen <jonas.jensen@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/moxart-mmc.c

index f3e18d08e8529e05e443395bfbf3cc73b1c3496a..d2a1ef61ec97f48009650948eea46a290f8dd241 100644 (file)
@@ -599,7 +599,9 @@ static int moxart_probe(struct platform_device *pdev)
                goto out;
        }
 
-       mmc_of_parse(mmc);
+       ret = mmc_of_parse(mmc);
+       if (ret)
+               goto out;
 
        dma_cap_zero(mask);
        dma_cap_set(DMA_SLAVE, mask);