summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-mrst.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-06-12 14:03:02 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-06-20 12:43:11 +0200
commitca95ef7c98674a8eb5d411fc0835783051c0662b (patch)
treeb2d03687874328d3d9a8fa3716b1d5207b76da10 /drivers/rtc/rtc-mrst.c
parentLinux 4.18-rc1 (diff)
downloadlinux-ca95ef7c98674a8eb5d411fc0835783051c0662b.tar.xz
linux-ca95ef7c98674a8eb5d411fc0835783051c0662b.zip
rtc: mrst: fix error code in probe()
We should be returning "retval". The "mrst_rtc.rtc" variable is a valid pointer. Fixes: 32b41f93dcaf ("rtc: mrst: switch to devm functions") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-mrst.c')
-rw-r--r--drivers/rtc/rtc-mrst.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c
index 097a4d4e2aba..1925aaf09093 100644
--- a/drivers/rtc/rtc-mrst.c
+++ b/drivers/rtc/rtc-mrst.c
@@ -367,10 +367,8 @@ static int vrtc_mrst_do_probe(struct device *dev, struct resource *iomem,
}
retval = rtc_register_device(mrst_rtc.rtc);
- if (retval) {
- retval = PTR_ERR(mrst_rtc.rtc);
+ if (retval)
goto cleanup0;
- }
dev_dbg(dev, "initialised\n");
return 0;