summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/dma/ste_dma40.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index ffac8225ff54..842e2ed04659 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -3535,7 +3535,6 @@ static int __init d40_probe(struct platform_device *pdev)
{
struct stedma40_platform_data *plat_data = pdev->dev.platform_data;
struct device_node *np = pdev->dev.of_node;
- int err;
int ret = -ENOENT;
struct d40_base *base = NULL;
struct resource *res = NULL;
@@ -3647,6 +3646,7 @@ static int __init d40_probe(struct platform_device *pdev)
base->lcpa_regulator = regulator_get(base->dev, "lcla_esram");
if (IS_ERR(base->lcpa_regulator)) {
d40_err(&pdev->dev, "Failed to get lcpa_regulator\n");
+ ret = PTR_ERR(base->lcpa_regulator);
base->lcpa_regulator = NULL;
goto failure;
}
@@ -3662,13 +3662,13 @@ static int __init d40_probe(struct platform_device *pdev)
}
base->initialized = true;
- err = d40_dmaengine_init(base, num_reserved_chans);
- if (err)
+ ret = d40_dmaengine_init(base, num_reserved_chans);
+ if (ret)
goto failure;
base->dev->dma_parms = &base->dma_parms;
- err = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE);
- if (err) {
+ ret = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE);
+ if (ret) {
d40_err(&pdev->dev, "Failed to set dma max seg size\n");
goto failure;
}
@@ -3676,8 +3676,8 @@ static int __init d40_probe(struct platform_device *pdev)
d40_hw_init(base);
if (np) {
- err = of_dma_controller_register(np, d40_xlate, NULL);
- if (err && err != -ENODEV)
+ ret = of_dma_controller_register(np, d40_xlate, NULL);
+ if (ret)
dev_err(&pdev->dev,
"could not register of_dma_controller\n");
}