[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1410866268-15185-6-git-send-email-pramod.gurav@smartplayin.com>
Date: Tue, 16 Sep 2014 16:47:48 +0530
From: Pramod Gurav <pramod.gurav@...rtplayin.com>
To: linux-kernel@...r.kernel.org
Cc: David Brown <davidb@...eaurora.org>,
Daniel Walker <dwalker@...o99.com>,
Bryan Huntsman <bryanh@...eaurora.org>,
Ulf Hansson <ulf.hansson@...aro.org>,
linux-mmc@...r.kernel.org, linux-arm-msm@...r.kernel.org
Subject: [PATCH 5/5] mmc: msm_sdcc: Remove unwanted initializations in probe
This removes unnecessary initialisations of resource pointers
and does away with a lable and just returns error on fail instead.
Cc: David Brown <davidb@...eaurora.org>
Cc: Daniel Walker <dwalker@...o99.com>
Cc: Bryan Huntsman <bryanh@...eaurora.org>
CC: Ulf Hansson <ulf.hansson@...aro.org>
CC: linux-mmc@...r.kernel.org
CC: linux-arm-msm@...r.kernel.org
Signed-off-by: Pramod Gurav <pramod.gurav@...rtplayin.com>
---
drivers/mmc/host/msm_sdcc.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index 5025364..2b0c4d9 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -1166,17 +1166,16 @@ msmsdcc_probe(struct platform_device *pdev)
struct msm_mmc_platform_data *plat = pdev->dev.platform_data;
struct msmsdcc_host *host;
struct mmc_host *mmc;
- struct resource *cmd_irqres = NULL;
- struct resource *stat_irqres = NULL;
- struct resource *memres = NULL;
- struct resource *dmares = NULL;
+ struct resource *cmd_irqres;
+ struct resource *stat_irqres;
+ struct resource *memres;
+ struct resource *dmares;
int ret;
/* must have platform data */
if (!plat) {
dev_err(&pdev->dev, "Platform data not available\n");
- ret = -EINVAL;
- goto out;
+ return -EINVAL;
}
if (pdev->id < 1 || pdev->id > 4)
@@ -1201,12 +1200,9 @@ msmsdcc_probe(struct platform_device *pdev)
/*
* Setup our host structure
*/
-
mmc = mmc_alloc_host(sizeof(struct msmsdcc_host), &pdev->dev);
- if (!mmc) {
- ret = -ENOMEM;
- goto out;
- }
+ if (!mmc)
+ return -ENOMEM;
host = mmc_priv(mmc);
host->pdev_id = pdev->id;
@@ -1402,7 +1398,7 @@ msmsdcc_probe(struct platform_device *pdev)
tasklet_kill(&host->dma_tlet);
host_free:
mmc_free_host(mmc);
- out:
+
return ret;
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists