aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/host/tmio_mmc.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index bbcbd72a46a4..b57664070485 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -522,23 +522,21 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev)
522 struct resource *res_ctl, *res_cnf; 522 struct resource *res_ctl, *res_cnf;
523 struct tmio_mmc_host *host; 523 struct tmio_mmc_host *host;
524 struct mmc_host *mmc; 524 struct mmc_host *mmc;
525 int ret = -ENOMEM; 525 int ret = -EINVAL;
526 526
527 if (dev->num_resources != 3) 527 if (dev->num_resources != 3)
528 goto out; 528 goto out;
529 529
530 res_ctl = platform_get_resource(dev, IORESOURCE_MEM, 0); 530 res_ctl = platform_get_resource(dev, IORESOURCE_MEM, 0);
531 res_cnf = platform_get_resource(dev, IORESOURCE_MEM, 1); 531 res_cnf = platform_get_resource(dev, IORESOURCE_MEM, 1);
532 if (!res_ctl || !res_cnf) { 532 if (!res_ctl || !res_cnf)
533 ret = -EINVAL;
534 goto out; 533 goto out;
535 }
536 534
537 pdata = cell->driver_data; 535 pdata = cell->driver_data;
538 if (!pdata || !pdata->hclk) { 536 if (!pdata || !pdata->hclk)
539 ret = -EINVAL;
540 goto out; 537 goto out;
541 } 538
539 ret = -ENOMEM;
542 540
543 mmc = mmc_alloc_host(sizeof(struct tmio_mmc_host), &dev->dev); 541 mmc = mmc_alloc_host(sizeof(struct tmio_mmc_host), &dev->dev);
544 if (!mmc) 542 if (!mmc)