Skip to content

Commit

Permalink
watchdog: s3c2410: Remove superfluous err label
Browse files Browse the repository at this point in the history
'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 <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[groeck: Fixed context conflicts]
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
  • Loading branch information
Sam Protsenko authored and Wim Van Sebroeck committed Dec 28, 2021
1 parent e249d01 commit 1a47cda
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions drivers/watchdog/s3c2410_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,22 +627,18 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
wdt_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (wdt_irq == NULL) {
dev_err(dev, "no irq resource specified\n");
ret = -ENOENT;
goto err;
return -ENOENT;
}

/* get the memory region for the watchdog timer */
wdt->reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(wdt->reg_base)) {
ret = PTR_ERR(wdt->reg_base);
goto err;
}
if (IS_ERR(wdt->reg_base))
return PTR_ERR(wdt->reg_base);

wdt->bus_clk = devm_clk_get(dev, "watchdog");
if (IS_ERR(wdt->bus_clk)) {
dev_err(dev, "failed to find bus clock\n");
ret = PTR_ERR(wdt->bus_clk);
goto err;
return PTR_ERR(wdt->bus_clk);
}

ret = clk_prepare_enable(wdt->bus_clk);
Expand Down Expand Up @@ -757,7 +753,6 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
err_bus_clk:
clk_disable_unprepare(wdt->bus_clk);

err:
return ret;
}

Expand Down

0 comments on commit 1a47cda

Please sign in to comment.