mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
watchdog: s3c2410: Remove superfluous err label
'err' label in probe function is not really need, it just returns. Remove it and replace all 'goto' statements with actual returns in place. No functional change here, just a cleanup patch. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20211107202943.8859-12-semen.protsenko@linaro.org [groeck: Fixed context conflicts] Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
This commit is contained in:
parent
e249d01b5e
commit
1a47cda07a
1 changed files with 4 additions and 9 deletions
|
@ -627,22 +627,18 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
|
||||||
wdt_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
wdt_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||||
if (wdt_irq == NULL) {
|
if (wdt_irq == NULL) {
|
||||||
dev_err(dev, "no irq resource specified\n");
|
dev_err(dev, "no irq resource specified\n");
|
||||||
ret = -ENOENT;
|
return -ENOENT;
|
||||||
goto err;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get the memory region for the watchdog timer */
|
/* get the memory region for the watchdog timer */
|
||||||
wdt->reg_base = devm_platform_ioremap_resource(pdev, 0);
|
wdt->reg_base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
if (IS_ERR(wdt->reg_base)) {
|
if (IS_ERR(wdt->reg_base))
|
||||||
ret = PTR_ERR(wdt->reg_base);
|
return PTR_ERR(wdt->reg_base);
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
|
|
||||||
wdt->bus_clk = devm_clk_get(dev, "watchdog");
|
wdt->bus_clk = devm_clk_get(dev, "watchdog");
|
||||||
if (IS_ERR(wdt->bus_clk)) {
|
if (IS_ERR(wdt->bus_clk)) {
|
||||||
dev_err(dev, "failed to find bus clock\n");
|
dev_err(dev, "failed to find bus clock\n");
|
||||||
ret = PTR_ERR(wdt->bus_clk);
|
return PTR_ERR(wdt->bus_clk);
|
||||||
goto err;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = clk_prepare_enable(wdt->bus_clk);
|
ret = clk_prepare_enable(wdt->bus_clk);
|
||||||
|
@ -757,7 +753,6 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
|
||||||
err_bus_clk:
|
err_bus_clk:
|
||||||
clk_disable_unprepare(wdt->bus_clk);
|
clk_disable_unprepare(wdt->bus_clk);
|
||||||
|
|
||||||
err:
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue