mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
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>
This commit is contained in:
parent
ce397d215c
commit
ca95ef7c98
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user