changed Makefile and profiles, added patches for kernel 2.6.24 (stable-branch of...
[openwrt/openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 0250-One-of-the-error-paths-on-s3cmci_probe-was-doing-t.patch
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().
8
9 Also renamed some of the labels, which varied from not following the
10 pattern to being somewhat misleading.
11
12 Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
13 ---
14 drivers/mmc/host/s3cmci.c | 13 ++++++++-----
15 1 files changed, 8 insertions(+), 5 deletions(-)
16
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);
24 host->clk = NULL;
25 - goto probe_free_host;
26 + goto probe_free_dma;
27 }
28
29 ret = clk_enable(host->clk);
30 if (ret) {
31 dev_err(&pdev->dev, "failed to enable clock source.\n");
32 - goto clk_free;
33 + goto probe_free_clk;
34 }
35
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);
39 if (ret) {
40 dev_err(&pdev->dev, "failed to add mmc host.\n");
41 - goto free_dmabuf;
42 + goto probe_disable_clk;
43 }
44
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");
48 return 0;
49
50 - free_dmabuf:
51 + probe_disable_clk:
52 clk_disable(host->clk);
53
54 - clk_free:
55 + probe_free_clk:
56 clk_put(host->clk);
57
58 probe_free_irq_cd:
59 free_irq(host->irq_cd, host);
60 +
61 + probe_free_dma:
62 + s3c2410_dma_free(host->dma, &s3cmci_dma_client);
63
64 probe_free_irq:
65 free_irq(host->irq, host);
66 --
67 1.5.6.3
68