Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340647
b: refs/heads/master
c: 5250c96
h: refs/heads/master
i:
  340645: 5deaa6f
  340643: b20d0e9
  340639: 7ed4986
v: v3
  • Loading branch information
Richard Cochran authored and David S. Miller committed Nov 3, 2012
1 parent 98035a4 commit 10bc007
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 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: a65dd5b236053fbafb1926b7694fcdb2482b2f73
refs/heads/master: 5250c9694fa879532470d87ebf6a485be1124221
17 changes: 8 additions & 9 deletions trunk/drivers/net/ethernet/ti/cpsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1252,14 +1252,12 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
ret = -ENOENT;
goto clean_clk_ret;
}

if (!request_mem_region(priv->cpsw_res->start,
resource_size(priv->cpsw_res), ndev->name)) {
dev_err(priv->dev, "failed request i/o region\n");
ret = -ENXIO;
goto clean_clk_ret;
}

regs = ioremap(priv->cpsw_res->start, resource_size(priv->cpsw_res));
if (!regs) {
dev_err(priv->dev, "unable to map i/o region\n");
Expand All @@ -1274,16 +1272,14 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
if (!priv->cpsw_wr_res) {
dev_err(priv->dev, "error getting i/o resource\n");
ret = -ENOENT;
goto clean_clk_ret;
goto clean_iomap_ret;
}

if (!request_mem_region(priv->cpsw_wr_res->start,
resource_size(priv->cpsw_wr_res), ndev->name)) {
dev_err(priv->dev, "failed request i/o region\n");
ret = -ENXIO;
goto clean_clk_ret;
goto clean_iomap_ret;
}

regs = ioremap(priv->cpsw_wr_res->start,
resource_size(priv->cpsw_wr_res));
if (!regs) {
Expand Down Expand Up @@ -1326,7 +1322,7 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
if (!priv->dma) {
dev_err(priv->dev, "error initializing dma\n");
ret = -ENOMEM;
goto clean_iomap_ret;
goto clean_wr_iomap_ret;
}

priv->txch = cpdma_chan_create(priv->dma, tx_chan_num(0),
Expand Down Expand Up @@ -1407,11 +1403,13 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
cpdma_chan_destroy(priv->txch);
cpdma_chan_destroy(priv->rxch);
cpdma_ctlr_destroy(priv->dma);
clean_iomap_ret:
iounmap(priv->regs);
clean_wr_iomap_ret:
iounmap(priv->wr_regs);
clean_cpsw_wr_iores_ret:
release_mem_region(priv->cpsw_wr_res->start,
resource_size(priv->cpsw_wr_res));
clean_iomap_ret:
iounmap(priv->regs);
clean_cpsw_iores_ret:
release_mem_region(priv->cpsw_res->start,
resource_size(priv->cpsw_res));
Expand Down Expand Up @@ -1442,6 +1440,7 @@ static int __devexit cpsw_remove(struct platform_device *pdev)
iounmap(priv->regs);
release_mem_region(priv->cpsw_res->start,
resource_size(priv->cpsw_res));
iounmap(priv->wr_regs);
release_mem_region(priv->cpsw_wr_res->start,
resource_size(priv->cpsw_wr_res));
pm_runtime_disable(&pdev->dev);
Expand Down

0 comments on commit 10bc007

Please sign in to comment.