Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332862
b: refs/heads/master
c: b707c65
h: refs/heads/master
v: v3
  • Loading branch information
Ulf Hansson authored and Vinod Koul committed Aug 31, 2012
1 parent ffb3f7b commit edbdc60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 983d7beb7de4ba7c715ea62e982c9fe54fa554a1
refs/heads/master: b707c65865e74b5cd98c66cb67fda8543248cb3b
14 changes: 9 additions & 5 deletions trunk/drivers/dma/ste_dma40.c
Original file line number Diff line number Diff line change
Expand Up @@ -2920,19 +2920,23 @@ static struct d40_base * __init d40_hw_detect_init(struct platform_device *pdev)
struct d40_base *base = NULL;
int num_log_chans = 0;
int num_phy_chans;
int clk_ret = -EINVAL;
int i;
u32 pid;
u32 cid;
u8 rev;

clk = clk_get(&pdev->dev, NULL);

if (IS_ERR(clk)) {
d40_err(&pdev->dev, "No matching clock found\n");
goto failure;
}

clk_enable(clk);
clk_ret = clk_prepare_enable(clk);
if (clk_ret) {
d40_err(&pdev->dev, "Failed to prepare/enable clock\n");
goto failure;
}

/* Get IO for DMAC base address */
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "base");
Expand Down Expand Up @@ -3062,10 +3066,10 @@ static struct d40_base * __init d40_hw_detect_init(struct platform_device *pdev)
return base;

failure:
if (!IS_ERR(clk)) {
clk_disable(clk);
if (!clk_ret)
clk_disable_unprepare(clk);
if (!IS_ERR(clk))
clk_put(clk);
}
if (virtbase)
iounmap(virtbase);
if (res)
Expand Down

0 comments on commit edbdc60

Please sign in to comment.