summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-wm831x.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2019-03-22 08:16:09 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-04-04 10:07:10 +0200
commitd315bc1be9553be33ea5ae5df20e0b2743bca2ff (patch)
tree7bc1794d7c305a6a4fd0803a4fb546c19fa17839 /drivers/rtc/rtc-wm831x.c
parentb9a1d801a9dd2c20c4ac3a3f0f220ad589a56f88 (diff)
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: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-wm831x.c')
-rw-r--r--drivers/rtc/rtc-wm831x.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c
index deaffe0eaf2f..1b0c3b3f63e8 100644
--- a/drivers/rtc/rtc-wm831x.c
+++ b/drivers/rtc/rtc-wm831x.c
@@ -429,7 +429,7 @@ static int wm831x_rtc_probe(struct platform_device *pdev)
ret = wm831x_reg_read(wm831x, WM831X_RTC_CONTROL);
if (ret < 0) {
dev_err(&pdev->dev, "Failed to read RTC control: %d\n", ret);
- goto err;
+ return ret;
}
if (ret & WM831X_RTC_ALM_ENA)
wm831x_rtc->alarm_enabled = 1;
@@ -459,9 +459,6 @@ static int wm831x_rtc_probe(struct platform_device *pdev)
wm831x_rtc_add_randomness(wm831x);
return 0;
-
-err:
- return ret;
}
static const struct dev_pm_ops wm831x_rtc_pm_ops = {