This removes unnecessary initialisations of resource pointers
and does away with a lable and just returns error on fail instead.

Cc: David Brown <[email protected]>
Cc: Daniel Walker <[email protected]>
Cc: Bryan Huntsman <[email protected]>
CC: Ulf Hansson <[email protected]>
CC: [email protected]
CC: [email protected]
Signed-off-by: Pramod Gurav <[email protected]>
---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to