mmc: TMIO: Ensure MFD cell is disabled on probe error path
authorIan Molton <ian.molton@codethink.co.uk>
Sun, 26 Apr 2015 23:01:06 +0000 (00:01 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 1 Jun 2015 07:06:47 +0000 (09:06 +0200)
Signed-off-by: Ian Molton <ian.molton@codethink.co.uk>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/tmio_mmc.c

index f746df493892c160a9623b9687c17c81dadcd66e..3d368b830e7c74a42638c394bd4b441bdfa9b3e8 100644 (file)
@@ -85,8 +85,10 @@ static int tmio_mmc_probe(struct platform_device *pdev)
        }
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res)
-               return -EINVAL;
+       if (!res) {
+               ret = -EINVAL;
+               goto cell_disable;
+       }
 
        pdata->flags |= TMIO_MMC_HAVE_HIGH_REG;