Commit d315bc1b authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: wm831x: remove unnecessary goto

There is no specific handling in the error path of wm831x_rtc_probe, remove
the unnecessary goto and label.
Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent b9a1d801
...@@ -429,7 +429,7 @@ static int wm831x_rtc_probe(struct platform_device *pdev) ...@@ -429,7 +429,7 @@ static int wm831x_rtc_probe(struct platform_device *pdev)
ret = wm831x_reg_read(wm831x, WM831X_RTC_CONTROL); ret = wm831x_reg_read(wm831x, WM831X_RTC_CONTROL);
if (ret < 0) { if (ret < 0) {
dev_err(&pdev->dev, "Failed to read RTC control: %d\n", ret); dev_err(&pdev->dev, "Failed to read RTC control: %d\n", ret);
goto err; return ret;
} }
if (ret & WM831X_RTC_ALM_ENA) if (ret & WM831X_RTC_ALM_ENA)
wm831x_rtc->alarm_enabled = 1; wm831x_rtc->alarm_enabled = 1;
...@@ -459,9 +459,6 @@ static int wm831x_rtc_probe(struct platform_device *pdev) ...@@ -459,9 +459,6 @@ static int wm831x_rtc_probe(struct platform_device *pdev)
wm831x_rtc_add_randomness(wm831x); wm831x_rtc_add_randomness(wm831x);
return 0; return 0;
err:
return ret;
} }
static const struct dev_pm_ops wm831x_rtc_pm_ops = { static const struct dev_pm_ops wm831x_rtc_pm_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment