提交 ca95ef7c 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册