summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-au1xxx.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2020-03-06 01:59:56 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2020-03-16 11:12:09 +0100
commit9cf71edb024a919a8ed8957748885d1e1e8d231a (patch)
treecd1561fdfeda50124f3f1653a231384e394fe73f /drivers/rtc/rtc-au1xxx.c
parent7fc9790aa38f22372c449b48ff25c71fbdd8e755 (diff)
downloadlinux-9cf71edb024a919a8ed8957748885d1e1e8d231a.tar.bz2
rtc: au1xxx: remove goto label
Simplify the driver by removing the goto label as it only does return ret. Link: https://lore.kernel.org/r/20200306005958.39203-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-au1xxx.c')
-rw-r--r--drivers/rtc/rtc-au1xxx.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-au1xxx.c b/drivers/rtc/rtc-au1xxx.c
index a13ac73aa2b7..73aeb15f9491 100644
--- a/drivers/rtc/rtc-au1xxx.c
+++ b/drivers/rtc/rtc-au1xxx.c
@@ -65,17 +65,13 @@ static int au1xtoy_rtc_probe(struct platform_device *pdev)
{
struct rtc_device *rtcdev;
unsigned long t;
- int ret;
t = alchemy_rdsys(AU1000_SYS_CNTRCTRL);
if (!(t & CNTR_OK)) {
dev_err(&pdev->dev, "counters not working; aborting.\n");
- ret = -ENODEV;
- goto out_err;
+ return -ENODEV;
}
- ret = -ETIMEDOUT;
-
/* set counter0 tickrate to 1Hz if necessary */
if (alchemy_rdsys(AU1000_SYS_TOYTRIM) != 32767) {
/* wait until hardware gives access to TRIM register */
@@ -88,7 +84,7 @@ static int au1xtoy_rtc_probe(struct platform_device *pdev)
* counters are unusable.
*/
dev_err(&pdev->dev, "timeout waiting for access\n");
- goto out_err;
+ return -ETIMEDOUT;
}
/* set 1Hz TOY tick rate */
@@ -108,9 +104,6 @@ static int au1xtoy_rtc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, rtcdev);
return rtc_register_device(rtcdev);
-
-out_err:
- return ret;
}
static struct platform_driver au1xrtc_driver = {