1 From 0053182d351d3a3fd6c094b223021eab6531f59c Mon Sep 17 00:00:00 2001
2 From: Andy Green <agreen@pads.home.warmcat.com>
3 Date: Sun, 10 Aug 2008 09:27:05 +0100
4 Subject: [PATCH] One of the error paths on s3cmci_probe() was doing the wrong thing, by
5 jumping to the wrong label. The correct label was missing, together
6 with the function call it should do in the sequence; I created it by
7 copying the correct line from s3cmci_remove().
9 Also renamed some of the labels, which varied from not following the
10 pattern to being somewhat misleading.
12 Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
14 drivers/mmc/host/s3cmci.c | 13 ++++++++-----
15 1 files changed, 8 insertions(+), 5 deletions(-)
17 diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
18 index edba055..9ef4d5b 100644
19 --- a/drivers/mmc/host/s3cmci.c
20 +++ b/drivers/mmc/host/s3cmci.c
21 @@ -1252,13 +1252,13 @@ static int s3cmci_probe(struct platform_device *pdev, int is2440)
22 dev_err(&pdev->dev, "failed to find clock source.\n");
23 ret = PTR_ERR(host->clk);
25 - goto probe_free_host;
26 + goto probe_free_dma;
29 ret = clk_enable(host->clk);
31 dev_err(&pdev->dev, "failed to enable clock source.\n");
33 + goto probe_free_clk;
36 host->clk_rate = clk_get_rate(host->clk);
37 @@ -1284,7 +1284,7 @@ static int s3cmci_probe(struct platform_device *pdev, int is2440)
38 ret = mmc_add_host(mmc);
40 dev_err(&pdev->dev, "failed to add mmc host.\n");
42 + goto probe_disable_clk;
45 platform_set_drvdata(pdev, mmc);
46 @@ -1292,14 +1292,17 @@ static int s3cmci_probe(struct platform_device *pdev, int is2440)
47 dev_info(&pdev->dev, "initialisation done.\n");
52 clk_disable(host->clk);
59 free_irq(host->irq_cd, host);
62 + s3c2410_dma_free(host->dma, &s3cmci_dma_client);
65 free_irq(host->irq, host);