diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2013-12-30 15:03:24 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-31 08:04:37 -0500 |
commit | 477b2bacb1bc30c62e390dbb8fda08bdef274d82 (patch) | |
tree | d97642444a289a8a597f8ddd9c636f3fec47e7ad /drivers/regulator | |
parent | 6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff) |
regulator: wm831x-dcdc: Remove unneeded 'err' label
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>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/wm831x-dcdc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c index 6823e6f2b88a..04cf9c16ef23 100644 --- a/drivers/regulator/wm831x-dcdc.c +++ b/drivers/regulator/wm831x-dcdc.c | |||
@@ -762,8 +762,7 @@ static int wm831x_boostp_probe(struct platform_device *pdev) | |||
762 | res = platform_get_resource(pdev, IORESOURCE_REG, 0); | 762 | res = platform_get_resource(pdev, IORESOURCE_REG, 0); |
763 | if (res == NULL) { | 763 | if (res == NULL) { |
764 | dev_err(&pdev->dev, "No REG resource\n"); | 764 | dev_err(&pdev->dev, "No REG resource\n"); |
765 | ret = -EINVAL; | 765 | return -EINVAL; |
766 | goto err; | ||
767 | } | 766 | } |
768 | dcdc->base = res->start; | 767 | dcdc->base = res->start; |
769 | 768 | ||
@@ -788,7 +787,7 @@ static int wm831x_boostp_probe(struct platform_device *pdev) | |||
788 | ret = PTR_ERR(dcdc->regulator); | 787 | ret = PTR_ERR(dcdc->regulator); |
789 | dev_err(wm831x->dev, "Failed to register DCDC%d: %d\n", | 788 | dev_err(wm831x->dev, "Failed to register DCDC%d: %d\n", |
790 | id + 1, ret); | 789 | id + 1, ret); |
791 | goto err; | 790 | return ret; |
792 | } | 791 | } |
793 | 792 | ||
794 | irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")); | 793 | irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")); |
@@ -799,15 +798,12 @@ static int wm831x_boostp_probe(struct platform_device *pdev) | |||
799 | if (ret != 0) { | 798 | if (ret != 0) { |
800 | dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", | 799 | dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", |
801 | irq, ret); | 800 | irq, ret); |
802 | goto err; | 801 | return ret; |
803 | } | 802 | } |
804 | 803 | ||
805 | platform_set_drvdata(pdev, dcdc); | 804 | platform_set_drvdata(pdev, dcdc); |
806 | 805 | ||
807 | return 0; | 806 | return 0; |
808 | |||
809 | err: | ||
810 | return ret; | ||
811 | } | 807 | } |
812 | 808 | ||
813 | static struct platform_driver wm831x_boostp_driver = { | 809 | static struct platform_driver wm831x_boostp_driver = { |