Commit ca95ef7c authored by Dan Carpenter's avatar Dan Carpenter Committed by Alexandre Belloni

rtc: mrst: fix error code in probe()

We should be returning "retval".  The "mrst_rtc.rtc" variable is a valid
pointer.

Fixes: 32b41f93 ("rtc: mrst: switch to devm functions")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent ce397d21
......@@ -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;
......
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