Skip to content

Commit

Permalink
regulator: wm831x-dcdc: Remove unneeded 'err' label
Browse files Browse the repository at this point in the history
There is no need to jump to the 'err' label.

Returnn the error directly instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Fabio Estevam authored and Mark Brown committed Dec 31, 2013
1 parent 6ce4eac commit 477b2ba
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions drivers/regulator/wm831x-dcdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,8 +762,7 @@ static int wm831x_boostp_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_REG, 0);
if (res == NULL) {
dev_err(&pdev->dev, "No REG resource\n");
ret = -EINVAL;
goto err;
return -EINVAL;
}
dcdc->base = res->start;

Expand All @@ -788,7 +787,7 @@ static int wm831x_boostp_probe(struct platform_device *pdev)
ret = PTR_ERR(dcdc->regulator);
dev_err(wm831x->dev, "Failed to register DCDC%d: %d\n",
id + 1, ret);
goto err;
return ret;
}

irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV"));
Expand All @@ -799,15 +798,12 @@ static int wm831x_boostp_probe(struct platform_device *pdev)
if (ret != 0) {
dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n",
irq, ret);
goto err;
return ret;
}

platform_set_drvdata(pdev, dcdc);

return 0;

err:
return ret;
}

static struct platform_driver wm831x_boostp_driver = {
Expand Down

0 comments on commit 477b2ba

Please sign in to comment.